Macromedia flex 2 Manuale

Pagina di 254
224
Creating Custom Validators
            
            return results;
        }
    }
}
In this example, because you are using a single validator to validate three subfields of the 
Object passed to the validator, you include the optional second argument to the constructor 
for the 
ValidationResult
 class to specify the subfield that caused the validation error. This 
inclusion permits Flex to identify the input component that caused the error, and to highlight 
that component in the application.