Archives: Validations

Java – Date Validation with Regular Expression

Date Format (dd/mm/yyyy) Regular Expression Pattern


The above regular expression is used to validate the date format in “dd/mm/yyyy”, you can easy customize to suit your need. However, it’s a bit hard to validate the leap year, 30 or 31 days of a month, we may need basic logic as below.

Java – Password Validation with Regular Expression

Password Regular Expression Pattern:


Whole combination is means, 6 to 20 characters string with at least one digit, one upper case letter, one lower case letter and one special symbol (“@#$%”). This regular expression pattern is very useful to implement a strong and complex password.

Java – URL Validation using Commons UrlValidator