public final class CapitalizeAllConstraint extends CorrectConstraint<String>
CorrectConstraint
implementation that
converts to upper case first letters of all words in a string.CapitalizeAll
,
ConstraintFactory.capitalizeAll()
Modifier and Type | Field and Description |
---|---|
static CapitalizeAllConstraint |
DEFAULT
CapitalizeAllConstraint single instance. |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getType()
Returns
java.lang.String type. |
<T> String |
validate(String value,
ValidationContext<T> context)
Converts to upper case first letters of all words in the specified
string.
|
getMessageTemplate
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public static final CapitalizeAllConstraint DEFAULT
CapitalizeAllConstraint
single instance.public Class<?> getType()
java.lang.String
type.java.lang.String
type.public <T> String validate(String value, ValidationContext<T> context)
T
- The type of validated entity.value
- String to be capitalized.context
- Validation context.Copyright © 2011–2020 FoxLabs. All rights reserved.