public class AttributeLengthValidator extends ValidatorAdapter
Modifier and Type | Method and Description |
---|---|
AttributeLengthValidator |
allowBlank(boolean allowBlank) |
String |
formatMessage(Locale locale,
Object... params)
Provides default implementation, will look for a property in resource bundle, using set message as key.
|
static AttributeLengthValidator |
on(String attribute) |
void |
validate(Validatable m)
Called by framework when validation is required
|
AttributeLengthValidator |
with(LengthOption lengthOption) |
getMessage, pinMessage, setMessage
public static AttributeLengthValidator on(String attribute)
public void validate(Validatable m)
Validator
m
- map being validated.public AttributeLengthValidator with(LengthOption lengthOption)
public AttributeLengthValidator allowBlank(boolean allowBlank)
public String formatMessage(Locale locale, Object... params)
ValidatorAdapter
formatMessage
in interface Validator
formatMessage
in class ValidatorAdapter
locale
- locale to use, or null for default locale.params
- parameters in case a message is parametrized.Copyright © 2020 JavaLite. All rights reserved.