Class RegexValidator
java.lang.Object
com.serinity.accesscontrol.util.RegexValidator
Utility class for validating input values using regular expressions.
Provides reusable validation logic for:
- Email addresses
- Phone number
- Passwords (strong policy)
NOTE: This class is immutable and cannot be instantiated.
- Since:
- 2026-02-17 RegexValidator.java
- Version:
- 1.0
- Author:
- @ZouariOmar
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidEmail(String email) Validates email format.static booleanisValidPassword(String password) Validates password format against complexity requirements.static booleanisValidPhoneNumber(String phoneNumber) Validates phone number format.
-
Method Details
-
isValidEmail
Validates email format.- Parameters:
email- email text to validate- Returns:
truewhen the email matches the expected format
-
isValidPhoneNumber
Validates phone number format.- Parameters:
phoneNumber- phone number text to validate- Returns:
truewhen the phone number matches the expected format
-
isValidPassword
Validates password format against complexity requirements.- Parameters:
password- password text to validate- Returns:
truewhen the password matches policy rules
-