Package com.skava.strategyimpl
Class DefaultPhoneValidatorStrategyImpl
java.lang.Object
com.skava.strategyimpl.DefaultPhoneValidatorStrategyImpl
- All Implemented Interfaces:
PhoneValidatorStrategy
This class provides functionality of validating the user phoneNumber by default validator
config.
- Author:
- Infosys Equinox
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
The default allow lowercase.static final boolean
The default allow number.static final boolean
The default allow uppercase.static final String
The default user allowed special chars.static final String
The default user pwd max length.static final String
The default user pwd min length. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isValidPhoneNumber
(String phoneNumber, org.json.JSONObject phoneNumberValidatorConfig) This method is used to checks whether the given phoneNumber is valid phoneNumber or not.
-
Field Details
-
DEFAULT_USER_CREDENTIAL_MIN_LENGTH
The default user pwd min length.- See Also:
-
DEFAULT_USER_CREDENTIAL_MAX_LENGTH
The default user pwd max length.- See Also:
-
DEFAULT_USER_ALLOWED_SPECIAL_CHARS
The default user allowed special chars.- See Also:
-
DEFAULT_ALLOW_NUMBER
public static final boolean DEFAULT_ALLOW_NUMBERThe default allow number.- See Also:
-
DEFAULT_ALLOW_UPPERCASE
public static final boolean DEFAULT_ALLOW_UPPERCASEThe default allow uppercase.- See Also:
-
DEFAULT_ALLOW_LOWERCASE
public static final boolean DEFAULT_ALLOW_LOWERCASEThe default allow lowercase.- See Also:
-
-
Constructor Details
-
DefaultPhoneValidatorStrategyImpl
public DefaultPhoneValidatorStrategyImpl()
-
-
Method Details
-
isValidPhoneNumber
public boolean isValidPhoneNumber(String phoneNumber, org.json.JSONObject phoneNumberValidatorConfig) This method is used to checks whether the given phoneNumber is valid phoneNumber or not.- Specified by:
isValidPhoneNumber
in interfacePhoneValidatorStrategy
- Parameters:
phoneNumber
- Indicates the phoneNumber of an user which is used for validating the user phoneNumber by default validator config.phoneNumberValidatorConfig
- HoldsJSONObject
which is phoneNumberConfig for validating the phoneNumber by default validator config.- Returns:
- True, if it is a valid phoneNumber
-