I have a mailchimp subscription form, I am trying to validate the input value so it only accepts a specific type of email, @gmail.com
for example.
[name]@gmail.com
, if the user insert other than @gmail.com form should not be submitted, I tried to achieve this using regex but did not work, so how can I achieve such a function in JS.