Class RegexValidator

java.lang.Object
com.serinity.accesscontrol.util.RegexValidator

public final class RegexValidator extends Object
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 Details

    • isValidEmail

      public static boolean isValidEmail(String email)
      Validates email format.
      Parameters:
      email - email text to validate
      Returns:
      true when the email matches the expected format
    • isValidPhoneNumber

      public static boolean isValidPhoneNumber(String phoneNumber)
      Validates phone number format.
      Parameters:
      phoneNumber - phone number text to validate
      Returns:
      true when the phone number matches the expected format
    • isValidPassword

      public static boolean isValidPassword(String password)
      Validates password format against complexity requirements.
      Parameters:
      password - password text to validate
      Returns:
      true when the password matches policy rules