Package io.github.mmm.validation.string
Class CharSequenceValidatorBuilder<V extends CharSequence,PARENT,SELF extends CharSequenceValidatorBuilder<V,PARENT,SELF>>
java.lang.Object
io.github.mmm.validation.main.ObjectValidatorBuilder<V,PARENT,SELF>
io.github.mmm.validation.string.CharSequenceValidatorBuilder<V,PARENT,SELF>
- Type Parameters:
V
- the generic type of the value tovalidate
.PARENT
- the generic type of theparent builder
.SELF
- the generic type of this builder itself (this).
- All Implemented Interfaces:
io.github.mmm.base.lang.Builder<Validator<? super V>>
,ValidatorRegistry<V,
SELF>
- Direct Known Subclasses:
ValidatorBuilderCharSequence
,ValidatorBuilderString
public abstract class CharSequenceValidatorBuilder<V extends CharSequence,PARENT,SELF extends CharSequenceValidatorBuilder<V,PARENT,SELF>>
extends ObjectValidatorBuilder<V,PARENT,SELF>
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionemail()
Adds aValidatorEmail
.Adds aValidatorEmailSpec
.host()
Adds aValidatorHost
(hostname or IP-address).hostname()
Adds aValidatorHostName
.Adds aValidatorIpAddress
.max
(int max) min
(int min) Adds aValidatorPhoneNumber
.This method allows to define a range in a generic way.url()
Adds aValidatorUrl
.Methods inherited from class io.github.mmm.validation.main.ObjectValidatorBuilder
add, add, and, build, getValidators, mandatory, max, min, self
-
Constructor Details
-
CharSequenceValidatorBuilder
The constructor.- Parameters:
parent
- theparent
builder.
-
-
Method Details
-
pattern
- Parameters:
pattern
- the regular expressionPattern
to match.- Returns:
- this build instance for fluent API calls.
-
pattern
- Parameters:
pattern
- the regular expressionPattern
to match.- Returns:
- this build instance for fluent API calls.
-
min
- Parameters:
min
- the minimum length allowed.- Returns:
- this build instance for fluent API calls.
-
max
- Parameters:
max
- the maximum length allowed.- Returns:
- this build instance for fluent API calls.
-
range
- Parameters:
min
- the minimum length allowed ornull
for no lower bound.max
- the maximum length allowed ornull
for no upper bound.- Returns:
- this build instance for fluent API calls.
-
range
Description copied from class:ObjectValidatorBuilder
This method allows to define a range in a generic way. If you have a properly typed builder please use more specific methods such asComparableValidatorBuilder.range(io.github.mmm.base.range.Range)
instead.- Specified by:
range
in classObjectValidatorBuilder<V extends CharSequence,
PARENT, SELF extends CharSequenceValidatorBuilder<V, PARENT, SELF>> - Parameters:
min
- the minimum value allowed ornull
for no lower bound.max
- the maximum value allowed ornull
for no upper bound.- Returns:
- this build instance for fluent API calls.
-
email
Adds aValidatorEmail
.- Returns:
- this build instance for fluent API calls.
-
emailSpec
Adds aValidatorEmailSpec
.- Returns:
- this build instance for fluent API calls.
-
phoneNumber
Adds aValidatorPhoneNumber
.- Returns:
- this build instance for fluent API calls.
-
host
Adds aValidatorHost
(hostname or IP-address).- Returns:
- this build instance for fluent API calls.
-
hostname
Adds aValidatorHostName
.- Returns:
- this build instance for fluent API calls.
-
ipAddress
Adds aValidatorIpAddress
.- Returns:
- this build instance for fluent API calls.
-
url
Adds aValidatorUrl
.- Returns:
- this build instance for fluent API calls.
-