Class NumberField.NumberFieldI18n
java.lang.Object
com.vaadin.flow.component.textfield.NumberField.NumberFieldI18n
- All Implemented Interfaces:
AbstractNumberFieldI18n
,Serializable
- Enclosing class:
- NumberField
The internationalization properties for
NumberField
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the error message displayed when the field contains user input that the server is unable to convert to typeNumber
.Gets the error message displayed when the field value is greater than the maximum allowed value.Gets the error message displayed when the field value is smaller than the minimum allowed value.Gets the error message displayed when the field is required but empty.Gets the error message displayed when the field value is not a multiple of the step value.setBadInputErrorMessage
(String errorMessage) Sets the error message to display when the field contains user input that the server is unable to convert to typeNumber
.setMaxErrorMessage
(String errorMessage) Sets the error message to display when the field value is greater than the maximum allowed value.setMinErrorMessage
(String errorMessage) Sets the error message to display when the field value is smaller than the minimum allowed value.setRequiredErrorMessage
(String errorMessage) Sets the error message to display when the field is required but empty.setStepErrorMessage
(String errorMessage) Sets the error message to display when the field value is not a multiple of the step value.
-
Constructor Details
-
NumberFieldI18n
public NumberFieldI18n()
-
-
Method Details
-
getBadInputErrorMessage
Gets the error message displayed when the field contains user input that the server is unable to convert to typeNumber
.- Specified by:
getBadInputErrorMessage
in interfaceAbstractNumberFieldI18n
- Returns:
- the error message or
null
if not set
-
setBadInputErrorMessage
Sets the error message to display when the field contains user input that the server is unable to convert to typeNumber
.Note, custom error messages set with
NumberField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message to set, ornull
to clear- Returns:
- this instance for method chaining
-
getRequiredErrorMessage
Gets the error message displayed when the field is required but empty.- Specified by:
getRequiredErrorMessage
in interfaceAbstractNumberFieldI18n
- Returns:
- the error message or
null
if not set - See Also:
-
setRequiredErrorMessage
Sets the error message to display when the field is required but empty.Note, custom error messages set with
NumberField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message to set, ornull
to clear- Returns:
- this instance for method chaining
- See Also:
-
getMinErrorMessage
Gets the error message displayed when the field value is smaller than the minimum allowed value.- Specified by:
getMinErrorMessage
in interfaceAbstractNumberFieldI18n
- Returns:
- the error message or
null
if not set - See Also:
-
setMinErrorMessage
Sets the error message to display when the field value is smaller than the minimum allowed value.Note, custom error messages set with
NumberField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message to set, ornull
to clear- Returns:
- this instance for method chaining
- See Also:
-
getMaxErrorMessage
Gets the error message displayed when the field value is greater than the maximum allowed value.- Specified by:
getMaxErrorMessage
in interfaceAbstractNumberFieldI18n
- Returns:
- the error message or
null
if not set - See Also:
-
setMaxErrorMessage
Sets the error message to display when the field value is greater than the maximum allowed value.Note, custom error messages set with
NumberField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message to set, ornull
to clear- Returns:
- this instance for method chaining
- See Also:
-
getStepErrorMessage
Gets the error message displayed when the field value is not a multiple of the step value.- Specified by:
getStepErrorMessage
in interfaceAbstractNumberFieldI18n
- Returns:
- the error message or
null
if not set - See Also:
-
setStepErrorMessage
Sets the error message to display when the field value is not a multiple of the step value.Note, custom error messages set with
NumberField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message to set, ornull
to clear- Returns:
- this instance for method chaining
- See Also:
-