Package com.jbstrap.ui.components.form
Interface FormValidator
public interface FormValidator
Interface class for implementing the custom form validators. This class requires the validate method, which is called by the
Form
component, during the validating process.
If the method returns with true
, the form is valid, otherwise it will be marked as invalid.- Since:
- 4.0
- Author:
- JBStrap
-
Method Summary
-
Method Details
-
validate
Checks the validity of a form. The check implemented here overwrites the default validation implementation, so the default one will not be used. Every validation must be implemented (including the check for a mandatory field) when overwriting the default one.- Parameters:
form
- The form instance, which will be validatedrecord
- The form's record, that contains the current form data- Returns:
- Must return with
true
if the validation is successful. In this case, the form will be validated. Otherwise the form will be invalid, and it must return withfalse
-