Class AbstractBeanValidator

java.lang.Object
io.jmix.flowui.component.validation.bean.AbstractBeanValidator
All Implemented Interfaces:
Validator, Consumer
Direct Known Subclasses:
BeanPropertyValidator

public class AbstractBeanValidator extends Object implements Validator
  • Field Details

    • beanClass

      protected Class beanClass
    • beanProperty

      protected String beanProperty
    • validationErrorMessage

      protected String validationErrorMessage
    • validationGroups

      protected Class[] validationGroups
    • metadata

      protected Metadata metadata
    • messages

      protected Messages messages
    • messageTools

      protected MessageTools messageTools
    • validator

      protected jakarta.validation.Validator validator
  • Constructor Details

    • AbstractBeanValidator

      protected AbstractBeanValidator(Class beanClass, String beanProperty)
    • AbstractBeanValidator

      protected AbstractBeanValidator(Class beanClass, String beanProperty, Class[] validationGroups)
  • Method Details

    • getValidationGroups

      public Class[] getValidationGroups()
    • setValidationGroups

      public void setValidationGroups(Class[] validationGroups)
      Set custom validation groups. If not set validator uses Default and UiComponentChecks groups.
      Parameters:
      validationGroups - validation groups
    • getValidationErrorMessage

      public String getValidationErrorMessage()
    • setValidationErrorMessage

      public void setValidationErrorMessage(String validationErrorMessage)
      Set main validation error message. Useful only for custom validation in view controller.
      Parameters:
      validationErrorMessage - validation error message
    • accept

      public void accept(Object value)
      Description copied from interface: Validator
      Checks a value.
      Specified by:
      accept in interface Consumer
      Specified by:
      accept in interface Validator
      Parameters:
      value - a value
    • getDefaultErrorMessage

      public String getDefaultErrorMessage()