[Answer]-Customize bootstrap email form field validation

1๐Ÿ‘

โœ…

I would suggest you to create ajax post request with email in it. On backed evaluate your email and return response in JSON. Parse JSON on frontend and see if email is validate or not.

EDIT

I guess that you are using bootstrapvalidator, so you can override emailAddress.js and implement it by your own. Also you can just change their current regex which is

var emailRegExp   = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/
๐Ÿ‘คSasa

Leave a comment