Basic Form Validation in C5 somehow useless?

Permalink
Hi.

I tried to use the form validation helper to validate my custom form (not build with the form block). Why is the Form Validation returning only an error object with messages? There is no way to associate the error messages to the fields that produced that error.

Was this helper only intended to be used to find out if there is an error and how many?

malthoff
 
malthoff replied on at Permalink Reply
malthoff
ok, taking that back. It's really meant to be used without the possibility to associate the field with the error afterwards.

The key is to make the error messages specific so the output can be: "Phone is a required filed, Name is a required field" and not just generic "This field is required" (what one could put beneath a specific field).

If you want to have it custom create your own form helper from the one provided by C5 and just return the fieldsInvalid array instead of just the number of errors.