hi,
I am user smartgwt 3.0p
I try to do some validation on dynamicform field.
It's a requiredIf check and I want it work both on client and server side,
so I need to define the validation in datasource and I search the forum got that the best way is to use customValidation in smartgwt.
My case is this : when field [url] got input, [landing_url] should be required="true", but I found when I leave [landing_url] blank the validation will not be called.
Anyhelp will be appreciate.
My code
I am user smartgwt 3.0p
I try to do some validation on dynamicform field.
It's a requiredIf check and I want it work both on client and server side,
so I need to define the validation in datasource and I search the forum got that the best way is to use customValidation in smartgwt.
My case is this : when field [url] got input, [landing_url] should be required="true", but I found when I leave [landing_url] blank the validation will not be called.
Anyhelp will be appreciate.
My code
Code:
<field name="url" type="text" length="255" /> <field name="landing_url" type="text" length="255"> <validators> <validator type="serverCustom"> <serverCondition>#if(!$record.url.equals("") && $value.equals("")) false #else true #end</serverCondition> </validator> </validators> </field>
Comment