Class ValidationErrors
java.lang.Object
io.jmix.flowui.component.validation.ValidationErrors
Describes validation errors.
To create an object of this class, use the constructor, of(String)
or none()
methods.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an error.void
add
(ValidationErrors.Item item) Adds an error item.void
Add an error without reference to component causing it.void
addAll
(ValidationErrors errors) Add all errors.getAll()
com.vaadin.flow.component.Component
boolean
isEmpty()
static ValidationErrors
none()
static ValidationErrors
Creates new object with one validation error.
-
Field Details
-
items
-
-
Constructor Details
-
ValidationErrors
public ValidationErrors()
-
-
Method Details
-
add
Add an error without reference to component causing it.- Parameters:
description
- error description
-
add
Adds an error.- Parameters:
component
- component causing the errordescription
- error description
-
add
Adds an error item.- Parameters:
item
- item to add
-
addAll
Add all errors.- Parameters:
errors
- errors
-
getAll
- Returns:
- errors list
-
isEmpty
public boolean isEmpty()- Returns:
- true if there are no errors
-
getFirstComponent
@Nullable public com.vaadin.flow.component.Component 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
-