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

    Modifier and Type
    Method
    Description
    boolean
    validate(Form form, Record record)
    Checks the validity of a form.
  • Method Details

    • validate

      boolean validate(Form form, Record record)
      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 validated
      record - 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 with false