Ok,

I reply to myself hoping this would be of any help for somebody else.
Is as simple as to make your own IValidationDelegate and override (exemple)
this method:

public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle,
           IFormComponent component, IValidator validator) {
       // If the form component represents a required field
       // it adds the required field class
       super.writeAttributes(writer, cycle,component,  validator);
       if (component.isRequired()) {
           writer.appendAttribute("class", "requiredField");
       }
   }

obviously then you have to use your IValidationDelegate in your
pages/components.



On 3/23/07, Martino Piccinato <[EMAIL PROTECTED]> wrote:

Hi,

is there a "standard" way to define common formatting for required fields
BEFORE client/server side validation happens?
It's always a good thing for users to know compulsory fields before
starting data insertion.

I know the issue is easy to solve just by adding few things but it would
be good to have this in componentes that accept "required" validator.

Martino

Reply via email to