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

StudentAction-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="dob">
        <field-validator type="required">
            <message>DOB cannot be null.</message>
        </field-validator>
    </field>

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

    <field name="email">
        <field-validator type="requiredstring">
            <message>Email cannot be null.</message>
        </field-validator>
        <field-validator type="email">
            <message>Please enter a valid EMail Address.</message>
        </field-validator>
    </field>

    <field name="collegeId">
        <field-validator type="long">
            <param name="min">1</param>
            <message>College Id cannot be null.</message>
        </field-validator>
    </field>

</validators>
Comments