Spry Validation Textarea Samples

This page gives examples of the textarea widget capabilities.


This is an example of a textarea validation widget. There are three validation techniques: validation can occur as-you-type (Change), when the textarea looses focus (Blur) or only when the form is submitted (Submit). The Submit validation occurs always, regardless of the other options chosen.


The value is required.

The value is required.

The value is required.


The next example shows two more of the textarea widget's features: the character counter, and the enforce max characters option.

  The value is required. The maximum number of characters exceeded.

Also, you can define a minimum number of characters to be entered, and the counter can have an upward direction.

  The value is required. The minimum number of characters not met.

The user will receive visual feedback whenever one of his actions conflicts with the expected behavior. For example, try to enter less than 10 characters or more than 20 in the textareas below. You will receive error messages for the first one, and you won't be able to enter any more characters in the second one.

  The value is required. The minimum number of characters not met. The maximum number of characters exceeded.   The value is required. The minimum number of characters not met. The maximum number of characters exceeded.

You can define a separate HTML element to display the error messages for this widget.

  The value is required. The minimum number of characters not met. The maximum number of characters exceeded.
Errors: The value for the textarea is required. The minimum number of characters criteria not met. The maximum number of characters criteria exceeded.

The following example shows how to change error messages. You can edit them directly in page, change the css class for them or remove them completely.

  Enter your comment. You must enter at least 10 characters. Character limit exceeded.

Also, you can change the widget container to use directly the textarea label, and don't use any error messages.