I already have an email validator that works alright to check format of emails in the form of regular expression.
Now - I want to write another email validator in Java (since my application is on JSF, Glassfish 3.x) that does not allow non-government emails to be entered in the textbox. All domains like yahoo, gmail, hotmail etc. should not be accepted.
It should only accept Indian government domain based emails - @gov.in
, @nic.in
- all other emails should be rejected and the user should be suitably informed.
Requesting help in this regard. Thanks in advance.