com.vaadin.flow.component.textfield.
Class EmailField.EmailFieldI18n
All Implemented Interfaces:
Enclosing class:
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 with
EmailField.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 with
EmailField.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 setSee 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 itReturns:
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 setSee 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 itReturns:
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 setSee 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 itReturns:
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 with
EmailField.setPattern(String)
.Returns:
the error message or
null
if not setSee 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 with
EmailField.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 itReturns:
this instance for method chaining
See Also:
-