Package io.jmix.ui.component
Interface HasValidator<V>
- Type Parameters:
V
- value type
- All Known Subinterfaces:
CheckBox
,CheckBoxGroup<I>
,ColorPicker
,ComboBox<V>
,CurrencyField<V>
,DateField<V>
,DatePicker<V>
,EntityComboBox<V>
,EntityLinkField<V>
,EntityPicker<V>
,EntitySuggestionField<V>
,Field<V>
,FileStorageUploadField
,FileUploadField
,MaskedField<V>
,MultiSelectList<V>
,OptionsField<V,
,I> PasswordField
,RadioButtonGroup<I>
,ResizableTextArea<V>
,RichTextArea
,SelectList<V,
,I> SingleSelectList<V>
,Slider<V>
,SourceCodeEditor
,SuggestionField<V>
,SuggestionFieldComponent<V,
,I> TagField<V>
,TagPicker<V>
,TextArea<V>
,TextField<V>
,TextInputField<V>
,TimeField<V>
,TwinColumn<V>
,ValuePicker<V>
,ValuesPicker<V>
,WebdavDocumentUploadField
- All Known Implementing Classes:
AbstractField
,AbstractFileStorageUploadField
,AbstractSelectList
,AbstractSingleFileUploadField
,AbstractSuggestionField
,AbstractTextArea
,CheckBoxGroupImpl
,CheckBoxImpl
,ColorPickerImpl
,ComboBoxImpl
,CurrencyFieldImpl
,DateFieldImpl
,DatePickerImpl
,EntityComboBoxImpl
,EntityLinkFieldImpl
,EntityPickerImpl
,EntitySuggestionFieldImpl
,FileStorageUploadFieldImpl
,FileUploadFieldImpl
,MaskedFieldImpl
,MultiSelectListImpl
,PasswordFieldImpl
,RadioButtonGroupImpl
,ResizableTextAreaImpl
,RichTextAreaImpl
,SearchFieldImpl
,SingleSelectListImpl
,SliderImpl
,SourceCodeEditorImpl
,SuggestionFieldImpl
,TagFieldImpl
,TagPickerImpl
,TextAreaImpl
,TextFieldImpl
,TimeFieldImpl
,TwinColumnImpl
,ValuePickerImpl
,ValuesPickerImpl
,WebdavDocumentUploadFieldImpl
public interface HasValidator<V>
Interface to be implemented by a component that can have validators.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addValidator
(Validator<? super V> validator) Adds a validator instance to the component.default void
addValidators
(Validator<? super V>... validators) Sequentially adds validators to the component.void
removeValidator
(Validator<V> validator) Removes a validator instance from the component.
-
Method Details
-
addValidator
@StudioElementsGroup(caption="Validators", xmlElement="validators", icon="io/jmix/ui/icon/element/validators.svg") void addValidator(Validator<? super V> validator) Adds a validator instance to the component. TheValidationException
must be thrown by the validator if the value is not valid.- Parameters:
validator
- a validator to add- See Also:
-
removeValidator
Removes a validator instance from the component.- Parameters:
validator
- a validator to remove
-
addValidators
Sequentially adds validators to the component.- Parameters:
validators
- validators to add
-
getValidators
Collection<Validator<V>> getValidators()- Returns:
- unmodifiable collection of component validators.
-