Thanks Atul, this is good starting point
http://tetlaw.id.au/view/javascript/really-easy-field-validation
<http://tetlaw.id.au/view/javascript/really-easy-field-validation>and yes
attribute 'widget-style' holds the key..

On Sat, May 29, 2010 at 12:00 PM, Atul Vani <[email protected]>wrote:

> hi Varun,
>
> never came across use of validation.js in xml forms
>
> but this is the sort of thing you need to do
> 1. include a js code like below:-
> Event.observe(window, 'load', function() {
>   if ($('formName'))
>       validateNewUser = new Validation('formName', {immediate: true});
> }
>
> 2. and in the respective form use the suitable class for form fields
> <field ... widget-style="required"> ... </field>
> <field ... widget-style="validate-email"> ... </field>
> <field ... widget-style="validate-url"> ... </field>
> etc
>
> go through the validation.js and you will know about other possible options
> available.
>
>
> --
> Thanks & Regards
> Atul Vani
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
> http://www.hotwaxmedia.com/
>
>
> varun bhansaly wrote:
>
>> Hi Atul,
>> Thanks for the response ! is it already being used somewhere in d app ?
>>
>> On Sat, May 29, 2010 at 10:11 AM, Atul Vani <[email protected]
>> >wrote:
>>
>>
>>
>>> hi Varun,
>>>
>>> you can make use of validation.js from
>>> ofbiz-trunk/framework/images/webapp/images/prototypejs/validation.js
>>>
>>> for it to work you will need to apply class to form-fields
>>> which can be done using <field ... widget-style=""/>
>>>
>>> you will also need to make a validator's object in javascript.
>>>
>>> --
>>> Thanks & Regards
>>> Atul Vani
>>> Enterprise Software Developer
>>> HotWax Media Pvt. Ltd.
>>> http://www.hotwaxmedia.com/
>>>
>>>
>>>
>>> varun bhansaly wrote:
>>>
>>>
>>>
>>>> Hi,
>>>> What would be the simplest & optimal way to validate xml forms ?
>>>> Also is there a way to make use of existing validation frameworks as
>>>> http://js-validator.sourceforge.net/ to validate form fields of xml
>>>> forms ?
>>>>
>>>> If some1 has done sumthing like this or has sum other ideas, it wud b
>>>> great to them.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>


-- 
Regards,
Varun Bhansaly

Reply via email to