Validators aren't called if there's the submitted value is null. That's why JSF components have a required attribute instead of a standard JSF requiredValidator.
It's not possible to create a required validator without creating an independent component-tree-scanning component that manually triggers such a validator for each EditableValueHolder. If you are interested, you can see an example of how this can be done at this link: http://wiki.apache.org/myfaces/OptionalValidationFramework On 1/2/06, Wendy Smoak <[EMAIL PROTECTED]> wrote: > The 'required' validation rule looks like it should call the > CommonsValidator.isSupplied method, and then use the 'errors.required' > message in messages.properties. > > Instead, when a form with a missing required field is submitted, a > breakpoint set in the 'isSupplied' message is never reached, and the > message that is displayed comes from the > javax.faces.component.UIInput.REQUIRED property. > > You can see it in the use-cases app. If you enter an expiration date, > but no credit card number, and submit the form, you get: > "creditCard": Value is required. > which isn't coming from messages.properties. It would be > Credit Card Number is required. > > The input component does not have 'required=true' set. Can anyone > explain how this is happening? > > Thanks, > -- > Wendy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
