Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

LengthRange validator and TextItem

$
0
0
Hi,

I've configured a range validator in my datasource:

Code:

<field name="NAME" type="text" title="$name" required="true">
<validators>
      <validator type="lengthRange" max="32"/>
</validators>
</field>

In my Dynamic Form, I correctly received an error when the entered value is too long, but I would like to not allow the user to enter more then 32 characters as if we called the setLength() method in the text item... but I think it's not good to hard code the limit in the code as well (only in the XML definition is ideal).

Is there a way to do this ?

Many thanks,
Thomas

Viewing all articles
Browse latest Browse all 4756