Class EmailField.EmailFieldI18n
java.lang.Object
com.vaadin.flow.component.textfield.EmailField.EmailFieldI18n
- All Implemented Interfaces:
Serializable
- Enclosing class:
- EmailField
The internationalization properties for
EmailField
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the error message displayed when the field value is longer than the maximum allowed length.Gets the error message displayed when the field value is shorter than the minimum allowed length.Gets the error message displayed when the field value does not match the default email format, or alternatively, the custom format if provided withEmailField.setPattern(String)
.Gets the error message displayed when the field is required but empty.setMaxLengthErrorMessage
(String errorMessage) Sets the error message to display when the field value is longer than the maximum allowed length.setMinLengthErrorMessage
(String errorMessage) Sets the error message to display when the field value is shorter than the minimum allowed length.setPatternErrorMessage
(String errorMessage) Sets the error message to display when the field value does not match the default email format, or alternatively, the custom format if provided withEmailField.setPattern(String)
.setRequiredErrorMessage
(String errorMessage) Sets the error message to display when the field is required but empty.
-
Constructor Details
-
EmailFieldI18n
public EmailFieldI18n()
-
-
Method Details
-
getRequiredErrorMessage
Gets the error message displayed when the field is required but empty.- 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
EmailField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message ornull
to clear it- Returns:
- this instance for method chaining
- See Also:
-
getMinLengthErrorMessage
Gets the error message displayed when the field value is shorter than the minimum allowed length.- Returns:
- the error message or
null
if not set - See Also:
-
setMinLengthErrorMessage
Sets the error message to display when the field value is shorter than the minimum allowed length.Note, custom error messages set with
EmailField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message ornull
to clear it- Returns:
- this instance for method chaining
- See Also:
-
getMaxLengthErrorMessage
Gets the error message displayed when the field value is longer than the maximum allowed length.- Returns:
- the error message or
null
if not set - See Also:
-
setMaxLengthErrorMessage
Sets the error message to display when the field value is longer than the maximum allowed length.Note, custom error messages set with
EmailField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message ornull
to clear it- Returns:
- this instance for method chaining
- See Also:
-
getPatternErrorMessage
Gets the error message displayed when the field value does not match the default email format, or alternatively, the custom format if provided withEmailField.setPattern(String)
.- Returns:
- the error message or
null
if not set - See Also:
-
setPatternErrorMessage
Sets the error message to display when the field value does not match the default email format, or alternatively, the custom format if provided withEmailField.setPattern(String)
.Note, custom error messages set with
EmailField.setErrorMessage(String)
take priority over i18n error messages.- Parameters:
errorMessage
- the error message ornull
to clear it- Returns:
- this instance for method chaining
- See Also:
-