Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed mixed up table of available validators

...

Validator

Constraint Type

Description

Example

email

Ensures that the given input is looks like a valid e-mail address

<t:textfield value="email" validate="email" />

max

long

Enforces a maximum integer value

<t:textfield value="age" validate="max=120,min=0" />

maxLength

int

Makes sure that a string value has a maximum length

<t:textfield value="zip" validate="maxlength=7" />

min

long

Enforces a minimum integer value

<t:textfield value="age" validate="max=120,min=0" />

minLength

int Does nothing (used to override a @Validate annotation)

Makes sure that a string value has a minimum length

<t:textfield value="somefield" validate="noneminlength=1" />

none

Makes sure that a string value has a minimum length

Does nothing (used to override a @Validate annotation)

<t:textfield value="somefield" validate="minlength=1none" />

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d1d00de25e914d42-236a8627-44c34f67-add48dac-8c48b1e60cc0d01b947e44b4"><ac:plain-text-body><![CDATA[

regexp

pattern

Makes sure that a string value conforms to a given pattern

<t:textfield value="letterfield" validate="regexp=^[A-Za-z]+$" />

]]></ac:plain-text-body></ac:structured-macro>

required

Makes sure that a string value is not null and not the empty string

<t:textfield value="name" validate="required" />

...