You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by dr...@apache.org on 2009/02/22 20:26:43 UTC
svn commit: r746803 -
/tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
Author: drobiazko
Date: Sun Feb 22 19:26:42 2009
New Revision: 746803
URL: http://svn.apache.org/viewvc?rev=746803&view=rev
Log:
TAP5-527: Input validation documentation is missing clear list of available validators and their correct notation to use.
Modified:
tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
Modified: tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt?rev=746803&r1=746802&r2=746803&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt (original)
+++ tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt Sun Feb 22 19:26:42 2009
@@ -303,6 +303,28 @@
formId is the BeanEditForm component's id, and the
fieldId is the name of the property being editted.
+Available Validators
+
+ Currently Tapestry provides the following built-in validators:
+
+*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
+| Validator | Constraint Type | Description | Example |
+*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
+| email | - | Ensures that the given input is 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 | Makes sure that a string value has a minimum length | <<<\<t:textfield value="somefield" validate="minlength=1" /\>>>> |
+*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
+| regexp | pattern | Makes sure that a string value conforms to a given pattern | <<<\<t:textfield value="otherfield" validate="regexp=^[a-z]+$" /\>>>> |
+*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
+| required | - | Makes sure that a string value is not null and not the empty string | <<<\<t:textfield value="name" validate="required" /\>>>> |
+*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
+
Overriding the Translator with Events
The TextField, PasswordField and TextArea components all have a translate parameter, a
@@ -380,3 +402,4 @@
an input value will be rejected on the client side even though it is valid on the server side. You may
need to disable client-side validation in order to use this feature.
+
Re: svn commit: r746803 - /tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
Posted by Igor Drobiazko <ig...@gmail.com>.
Because nobody will remember to remove this note when the issue is fixed. A
wiki is a better place for it, I think.
On Sun, Feb 22, 2009 at 8:56 PM, Ulrich Stärk <ul...@spielviel.de> wrote:
> Why did you omit the note about problems with quantifiers of the form {2,4}
> with the regexp validator?
>
> Uli
>
> drobiazko@apache.org schrieb:
>
> Author: drobiazko
>> Date: Sun Feb 22 19:26:42 2009
>> New Revision: 746803
>>
>> URL: http://svn.apache.org/viewvc?rev=746803&view=rev
>> Log:
>> TAP5-527: Input validation documentation is missing clear list of
>> available validators and their correct notation to use.
>>
>> Modified:
>> tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
>>
>> Modified: tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
>> URL:
>> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt?rev=746803&r1=746802&r2=746803&view=diff
>>
>> ==============================================================================
>> --- tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt (original)
>> +++ tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt Sun Feb 22
>> 19:26:42 2009
>> @@ -303,6 +303,28 @@
>> formId is the BeanEditForm component's id, and the
>> fieldId is the name of the property being editted.
>> +Available Validators
>> +
>> + Currently Tapestry provides the following built-in validators:
>> +
>>
>> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
>> +| Validator | Constraint Type | Description
>> | Example
>> |
>>
>> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
>> +| email | - | Ensures that the given input is 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 | Makes sure that a string value has a
>> minimum length | <<<\<t:textfield value="somefield"
>> validate="minlength=1" /\>>>> |
>>
>> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
>> +| regexp | pattern | Makes sure that a string value conforms
>> to a given pattern | <<<\<t:textfield value="otherfield"
>> validate="regexp=^[a-z]+$" /\>>>> |
>>
>> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
>> +| required | - | Makes sure that a string value is not
>> null and not the empty string | <<<\<t:textfield value="name"
>> validate="required" /\>>>> |
>>
>> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
>> +
>> Overriding the Translator with Events
>> The TextField, PasswordField and TextArea components all have a
>> translate parameter, a
>> @@ -380,3 +402,4 @@
>> an input value will be rejected on the client side even though it is
>> valid on the server side. You may
>> need to disable client-side validation in order to use this feature.
>> +
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>
--
Best regards,
Igor Drobiazko
Re: svn commit: r746803 - /tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
Posted by Ulrich Stärk <ul...@spielviel.de>.
Why did you omit the note about problems with quantifiers of the form
{2,4} with the regexp validator?
Uli
drobiazko@apache.org schrieb:
> Author: drobiazko
> Date: Sun Feb 22 19:26:42 2009
> New Revision: 746803
>
> URL: http://svn.apache.org/viewvc?rev=746803&view=rev
> Log:
> TAP5-527: Input validation documentation is missing clear list of available validators and their correct notation to use.
>
> Modified:
> tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
>
> Modified: tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt
> URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt?rev=746803&r1=746802&r2=746803&view=diff
> ==============================================================================
> --- tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt (original)
> +++ tapestry/tapestry5/trunk/src/site/apt/guide/validation.apt Sun Feb 22 19:26:42 2009
> @@ -303,6 +303,28 @@
> formId is the BeanEditForm component's id, and the
> fieldId is the name of the property being editted.
>
> +Available Validators
> +
> + Currently Tapestry provides the following built-in validators:
> +
> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
> +| Validator | Constraint Type | Description | Example |
> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
> +| email | - | Ensures that the given input is 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 | Makes sure that a string value has a minimum length | <<<\<t:textfield value="somefield" validate="minlength=1" /\>>>> |
> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
> +| regexp | pattern | Makes sure that a string value conforms to a given pattern | <<<\<t:textfield value="otherfield" validate="regexp=^[a-z]+$" /\>>>> |
> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
> +| required | - | Makes sure that a string value is not null and not the empty string | <<<\<t:textfield value="name" validate="required" /\>>>> |
> +*-----------+-----------------+---------------------------------------------------------------------+-----------------------------------------------------------------------+
> +
> Overriding the Translator with Events
>
> The TextField, PasswordField and TextArea components all have a translate parameter, a
> @@ -380,3 +402,4 @@
> an input value will be rejected on the client side even though it is valid on the server side. You may
> need to disable client-side validation in order to use this feature.
>
> +
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org