Hi,
As I experienced the built-in validators for UIInputs will only fire if the input is not empty. There’s no general purpose validator: customValidator, validateExpression or any validator added to the validator property will only be triggered if there’s a value in the input field.
Any ideas how create a general validator?
Thanks,
Tibor
Subject: Re: xpages - validation
Are you trying to validate that a value has been entered into the relevant UI control?
If so, the xp:validateRequired validator does this.
If you want to validate using a regular expression, the xp:validationExpression validator may do what you want.
Remember if you want to show the error in a “Display Error” or “Display Errors” control to ensure disableClientSideValidation is set to true on the control you’re validating.
Custom validation can always be applied with client-side or server-side javascript in all the various events available on the submit button you’re inserting into your XPage or Custom Control.
Regards
Paul