A delegate class for validating user inputs before a query is executed. Validation rules are derived from the D2W context.
To disallow a query with no user inputs, create a rule like:
entity.name = 'Foo' => allowsEmptyQueryValue = "false" (BooleanAssignment)
To define a validation for a propertyKey, create a rule like:
entity.name = 'Foo' and propertyKey='bar' => allowsEmptyQueryValue = "false" (BooleanAssignment)
To define a minimum length validation for a (String) propertyKey, create a rule like:
entity.name = 'Foo' and propertyKey='bar' => minimumInputLength = "3" (Assignment)
Subclasses wishing to implement custom validation logic should implement the {@link #validateQueryValues} method.The implementation should catch validation exceptions and invoke {@link er.directtoweb.pages.ERD2WPage#validationFailedWithException(Throwable,Object,String)} with any caught exceptions. To customizebehavior, while retaining the default checks, extend {@link ERDQueryValidationDelegate.DefaultQueryValidationDelegate}to perform custom validations and then call {@link #validateQueryValues} on the superclass.
@author Travis Cripps @d2wKey displayPropertyKeys @d2wKey maximumInputLength @d2wKey minimumInputLength @d2wKey maximumInputValue @d2wKey minimumInputValue
|
|
|
|