export default {
  emailValidation (emailId) {
    let regex = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
    if (regex.test(emailId)) {
      return true;
		} else {
      return false;
		}
	},

  mobileValidation (mobile) {
    let regex = /^\d{10}$/;
    if (regex.test(mobile)) return true;
  	else return false;
	},

  scriptValidation(string){
    let regex = /(\<script>alert\(.+)\)\<\/script\>/g;

      if (regex.test(string)) {
        return true;
      } else {
        return false;
      }
  },

  regexTester(regex, string){

  // let asd = /^[a-zA-Z]+$/;
 string = string.trim();
 
 if (regex.test(string)) {
      console.log("validations ",true)
      return true;
    } else {
      console.log("validations ",false)
      return false;
    }

}
 
};
