This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • required validator
Skip to end of metadata
Go to start of metadata

Description

RequiredFieldValidator checks if the specified field is not null.

Parameters

  • fieldName - field name if plain-validator syntax is used, not needed if field-validator syntax is used

Examples

Error rendering macro 'code': Invalid value specified for parameter 'java.lang.NullPointerException'
	   <validators>

        <!-- Plain Validator Syntax -->
        <validator type="required">
            <param name="fieldName">username</param>
            <message>username must not be null</message>
        </validator>


        <!-- Field Validator Syntax -->
        <field name="username">
            <field-validator type="required">
            	   <message>username must not be null</message>
            </field-validator>
        </field>

    </validators>
  • No labels