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

Validator called on the wrong field

$
0
0
Hi,

We're currently running SmartGWT Power edition 4.1 (v9.1p_2014-03-16/PowerEdition Deployment 2014-03-16).
One of our test site is suffering a problem that we're not able to reproduce on all other sites, neither in gwt dev mode.

The problem is with a form validation on a datasource that contains 2 fields with 2 validators each. When validating the form, regexp validator of the 2nd field is applied to the 1st.

This is clear when we test 2 invalid values handled by each regexp validator: error messages from field 1 validator and from field 2 validator are shown. See screenshot in attachment.

Definition of the validators in ds.xml:
Code:

<field name="CODE" type="text" title="$code" escapeHTML="true" length="16" required="true">
  <validators>
        <validator type="isUnique" criteriaFields="DELETED" requiresServer="true" errorMessage="This code is already used."/>
        <validator type="regexp" expression="^[A-Za-z0-9-_//,\.]*$" errorMessage="Invalid characters : space, (&gt;&lt;\ and accented characters"/>
  </validators>
</field>
<field name="NAME" type="text" title="$name" escapeHTML="true" required="true" length="32">
  <validators>
        <validator type="isUnique" criteriaFields="DELETED" requiresServer="true" errorMessage="This name is already used."/>
        <validator type="regexp" expression="^[^&gt;&lt;/\\]*$" errorMessage="Invalid characters (&gt;&lt;/\"/>
  </validators>
</field>

Is there something incorrect in the validators declaration?

Thanks for your help in advance
Regards
Antoine

Attached Images
File Type: png valid.png (6.5 KB)

Viewing all articles
Browse latest Browse all 4756

Trending Articles