Regex Validation validates given string with specified regular expression - Struts

Q.  Which validates the given string with the specified regular expression,it can be used in password, security key etc.?
- Published on 22 Jul 15

a. Regex Validation
b. Url Validation
c. Email Validation
d. RequiredString Validator

ANSWER: Regex Validation
 

    Discussion

  • Prajakta Pandit   -Posted on 14 Dec 15

    - Regex Validation validates the given string with the specified regular expression.

    - It has four parameters:

    1. fieldName : It specifies the field name that is to be validated.
    2. expression : It specifies the regular expression.
    3. caseSensitive : It specifies if the expression should be matched in case sensitive way. It is true by default.
    4. trim : It specifies if the value should be trimmed before matching. It is true by default.

    - It can be used in password, security key etc.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)