Validate Form Data using Regex in Java

Write a program to validate form data such as name, username, email id, phone number, Date of birth, password, credit card number, etc. using regex in Java.


 

Download   Run Code

Output:

Form Data is valid

 
Also See:

1. Validate an URL in Java
2. Validate an IP address in Java

 
References: OWASP Validation Regex Repository – OWASP

 
Thanks for reading.




Please use ideone or C++ Shell or any other online compiler link to post code in comments.
Like us? Please spread the word and help us grow. Happy coding 🙂
 





Leave a Reply

Notify of
avatar
wpDiscuz