1. SmartClient Version: v8.3p_2013-01-31/PowerEdition Deployment (built 2013-01-31)
2. FF18, IE9
Hi,
I have some questions regarding usage of validators:
For my UI for creation of customers with email field I've defined datasource.ds.xml file in wich I have the email field with regexp validator:
<field name="email" type="textWithTrimming" required="true" length="100" operator="iContains" escapeHTML="true" customSelectExpression="usr.EMAIL">
<validators>
<validator type="regexp" expression="^([a-zA-Z0-9_.\-+])+@(([a-zA-Z0-9\-])+\.)+[a-zA-Z0-9]{2,4}$" errorMessage="invalidEmail"/>
<validator type="lengthRange" min="1" max="100"/>
</validators>
</field>
In this manner I want to obtain client+server validation provided automatically by the framework.
Now I have another UI for searching customers, which should reuse the datasource.ds.xml but in that case I'd like to switch off the regex validator in terms of searching particular email addresses.
Can I dynamically switch off the usage of the client+server regex validator? I want still to have the length validator.
My temporary solution was to duplicate the field, once for creation and once for search what in my opinion isn't the best solution.
Thanks in advance,
zapryano
2. FF18, IE9
Hi,
I have some questions regarding usage of validators:
For my UI for creation of customers with email field I've defined datasource.ds.xml file in wich I have the email field with regexp validator:
<field name="email" type="textWithTrimming" required="true" length="100" operator="iContains" escapeHTML="true" customSelectExpression="usr.EMAIL">
<validators>
<validator type="regexp" expression="^([a-zA-Z0-9_.\-+])+@(([a-zA-Z0-9\-])+\.)+[a-zA-Z0-9]{2,4}$" errorMessage="invalidEmail"/>
<validator type="lengthRange" min="1" max="100"/>
</validators>
</field>
In this manner I want to obtain client+server validation provided automatically by the framework.
Now I have another UI for searching customers, which should reuse the datasource.ds.xml but in that case I'd like to switch off the regex validator in terms of searching particular email addresses.
Can I dynamically switch off the usage of the client+server regex validator? I want still to have the length validator.
My temporary solution was to duplicate the field, once for creation and once for search what in my opinion isn't the best solution.
Thanks in advance,
zapryano
Comment