Interface SupportsValidation<V>

All Superinterfaces:
com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasValidation, Serializable
All Known Implementing Classes:
EntityComboBox, EntityPicker, JmixBigDecimalField, JmixCheckboxGroup, JmixComboBox, JmixEmailField, JmixIntegerField, JmixMultiValuePicker, JmixNumberField, JmixPasswordField, JmixRadioButtonGroup, JmixSelect, JmixTextArea, JmixValuePicker, TypedDatePicker, TypedDateTimePicker, TypedTextField, TypedTimePicker

public interface SupportsValidation<V> extends com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasElement
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addValidator(Validator<? super V> validator)
     
    void
     
    default String
     
    default void
    setErrorMessage(String errorMessage)
     
    void
    setInvalid(boolean invalid)
    Sets invalid state to the field considering result of field validation.

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasValidation

    isInvalid
  • Field Details

  • Method Details

    • addValidator

      com.vaadin.flow.shared.Registration addValidator(Validator<? super V> validator)
    • executeValidators

      void executeValidators() throws ValidationException
      Throws:
      ValidationException
    • getErrorMessage

      @Nullable default String getErrorMessage()
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.HasValidation
    • setErrorMessage

      default void setErrorMessage(@Nullable String errorMessage)
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.HasValidation
    • setInvalid

      void setInvalid(boolean invalid)
      Sets invalid state to the field considering result of field validation.
      • Invalid - false and validation passed - false = field is valid
      • Invalid - false and validation passed - true = field is valid
      • Invalid - true and validation passed - false = field is invalid
      • Invalid - true and validation passed - true = field is valid
      Specified by:
      setInvalid in interface com.vaadin.flow.component.HasValidation
      Parameters:
      invalid - whether field should be invalid