Validation Patterns

Commonly used Validation patterns

1. Pattern which allows alphanumeric characters – ^[a-zA-Z0-9]*$

2. Pattern which allows only numeric characters – ^[0-9]*$

3. Pattern which allows only numeric and exactly 12 digits – ^[0-9]{12}$

Leave a comment

Your email address will not be published. Required fields are marked *