Package io.jmix.ui.component
Class ValidationErrors
java.lang.Object
io.jmix.ui.component.ValidationErrors
Encapsulates errors found during components validation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an error.voidAdd an error without reference to component causing it.voidaddAll(ValidationErrors errors) Add all errors.getAll()booleanisEmpty()static ValidationErrorsnone()static ValidationErrorsCreates new object with one validation error.
-
Constructor Details
-
ValidationErrors
public ValidationErrors()
-
-
Method Details
-
add
Add an error without reference to component causing it.- Parameters:
description- error description
-
add
Add an error.- Parameters:
component- component causing the errordescription- error description
-
addAll
Add all errors.- Parameters:
errors- errors
-
getAll
- Returns:
- errors list
-
isEmpty
public boolean isEmpty()- Returns:
- true if there are no errors
-
getFirstComponent
- Returns:
- component of the first validation problem or null if no validation errors
-
of
Creates new object with one validation error.- Parameters:
description- error description- Returns:
- object with one validation error
-
none
- Returns:
- immutable empty object
-