validation log

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

validation log

Jarosław Kowalewski
Hi,

I want to have a validation log in my Xforms form. The user fills in a
form and for example clicks trigger "Validate". This action checks a
form and show info about validation errors.

I mull over ev:event="xforms-valid" but it's for single field, isn't it?
How do it for all form fields? Can a tell "In field {hier label} is an
error"?

I use xsd for data validation. It is possible to check type of error?



Thanks for help

Jarek
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: validation log

Aaron Reed
The quick way that I'd do it is using JS.  xforms-valid is for a single
field but it works its way through the DOM to its target just like any
other DOM message.  You could listen for the message at a common parent
of the fields and log what the target is, etc.

You could also do your validation on the server.  Send the data to a
servlet/.php/.jsp, etc and do the validation on the server, have it
format whatever error messages that the schema validation package that
you run on the server gives out and then serve the results back to the
client.

--Aaron

Jarek wrote:

> Hi,
>
> I want to have a validation log in my Xforms form. The user fills in a
> form and for example clicks trigger "Validate". This action checks a
> form and show info about validation errors.
>
> I mull over ev:event="xforms-valid" but it's for single field, isn't it?
> How do it for all form fields? Can a tell "In field {hier label} is an
> error"?
>
> I use xsd for data validation. It is possible to check type of error?
>
>
>
> Thanks for help
>
> Jarek
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: validation log

Jarosław Kowalewski
Hi,
I found that old info, but I don't understand how to make it. Could you
write a simple example of JS how to access DOM message xforms-valid or
xforms-invalid, please?

thx
Jarek

2009/5/19 Aaron Reed <[hidden email]>

> The quick way that I'd do it is using JS.  xforms-valid is for a single
> field but it works its way through the DOM to its target just like any other
> DOM message.  You could listen for the message at a common parent of the
> fields and log what the target is, etc.
>
> You could also do your validation on the server.  Send the data to a
> servlet/.php/.jsp, etc and do the validation on the server, have it format
> whatever error messages that the schema validation package that you run on
> the server gives out and then serve the results back to the client.
>
> --Aaron
>
>
> Jarek wrote:
>
>> Hi,
>>
>> I want to have a validation log in my Xforms form. The user fills in a
>> form and for example clicks trigger "Validate". This action checks a form
>> and show info about validation errors.
>>
>> I mull over ev:event="xforms-valid" but it's for single field, isn't it?
>> How do it for all form fields? Can a tell "In field {hier label} is an
>> error"?
>>
>> I use xsd for data validation. It is possible to check type of error?
>>
>>
>>
>> Thanks for help
>>
>> Jarek
>>
> _______________________________________________
> dev-tech-xforms mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xforms
>
_______________________________________________
dev-tech-xforms mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xforms
Loading...