Source Code‎ > ‎src‎ > ‎in.co.sunrays.proj1‎ > ‎action‎ > ‎

UserRegistrationAction-validation.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE validators PUBLIC
          "-//OpenSymphony Group//XWork Validator 1.0.3//EN"
          "http://www.opensymphony.com/xwork/xwork-validator-1.0.3.dtd">
<validators>

    <field name="firstName">
        <field-validator type="requiredstring">
            <message>First Name cannot be null.</message>
        </field-validator>
    </field>

    <field name="lastName">
        <field-validator type="requiredstring">
            <message>Last Name cannot is null.</message>
        </field-validator>
    </field>

    <field name="login">
        <field-validator type="requiredstring">
            <message>Login cannot be null.</message>
        </field-validator>
    </field>

    <field name="password">
        <field-validator type="requiredstring">
            <message>Password cannot be null.</message>
        </field-validator>

        <field-validator type="expression">
            <param name="expression">password.equals(confirmPassword)</param>
            <message>Password and Confirm Password not match.</message>
        </field-validator>
    </field>

    <field name="confirmPassword">
        <field-validator type="requiredstring">
            <message>Confirm Password cannot be null.</message>
        </field-validator>
    </field>

    <field name="gender">
        <field-validator type="requiredstring">
            <message>Gender cannot be null.</message>
        </field-validator>
    </field>

    <field name="mobileNo">
        <field-validator type="requiredstring">
            <message>MobileNo cannot be null.</message>
        </field-validator>

        <field-validator type="stringlength">
            <param name="minLength">10</param>
            <param name="maxLength">10</param>
            <param name="trim">true</param>
            <message>Please Enter a valid Mobile No.</message>
        </field-validator>
    </field>

    <field name="dob">
        <field-validator type="required">
            <message>DOB cannot be null.</message>
        </field-validator>
    </field>

</validators>
Comments