CSValidation addon 0.3.0 is available

Version 0.3.0 of the Client-Side Validation addon is out with several significant enhancements:

[list]

[*]

CSValidatedTextArea
- a multi-line text area with client-side validation. Setting
setRows()
does not make the regular
CSValidatedTextField
multi-line, but you have to use this class.

[*]
New "
valid
" and "
partial
" keywords for JavaScript evaluation results that allow specifying a message after the keyword. The valid and partial messages are displayed in the same area as the error messages. This makes creation of various counters, for example, very easy.

[*]
Validation is now done also for empty fields. This may change the behavior of existing applications.

[/list]The new features are demonstrated in the new
counter example
. It shows how to make different kinds of counters to display how many characters you have typed and how many you can still type.

[list]

[]

Project home page

[
]

API Documentation

[*]

Download the JAR
from Vaadin Directory

[/list]The addon is still marked as “beta” and only Firefox is listed in the browsers, as I haven’t tested the other browsers. Please give feedback if you find that the addon works ok with other browsers as well, or if it doesn’t.

You can safely add Safari (and probably other WebKit based browsers as well) to the list of _un_supported browsers. It fails completely, for some internal JavaScript error, that is caused by the validator, marking the component always as erroneous, plus a cryptic JavaScript error message is show beside the field.

So it seems, fixed, now it seems to work with at least Safari and Chrome as well. Thanks.

I put out the
0.3.3
, which:

[list]

[]
fixes the JavaScript evaluation problem
[
]
validates the field also when it’s created and is non-empty
[]
the [tt]
setValidateEmpty(true)
[/tt] forces validation also when the field is empty after creation, which is useful for counters
[
]
the error/validation message can now be styled better

[/list]Updated the
counter demos
.

There still seems to be a JavaScript evaluation problem with Opera at least. Oh well, have to look into that later.