Im using this validation plugin: https://github.com/posabsolute/jQuery-Validation-Engine
The email input field i have should validate if its a reall email and not allow certain email domains (hotmail, gmail). i have read trough the whole readme on the plugin website but theres nothing usefull i could find there on how to make it do this. so if anyone knows how to do it or has a link to documentation on how to would make you a life safer.
thanks in advance.
I can suggest you to do the next (I didn’t test this so let me know if it does not work).
This plugin allows you to specify custom regexes for validation. All regexes are placed in the so called
translation file(jquery.validationEngine-en.jsfor English). There you can see$.validationEngineLanguage.allRulesobject. Add to it your custom rule where you need to set your own regex to forbid (gmail, hotmail etc):You can see that I added almost default regexp, which was specified in the
"email"rule, but included to it the negative lookahead(?!gmail\.com|hotmail.com)(you can add another domains with|newemail\.comapproach).Then you need to set this custom rule for your input: