Class EmailValidatorImpl
java.lang.Object
ch.tocco.nice2.validate.api.validators.AbstractValidator
ch.tocco.nice2.validate.api.validators.EmailValidatorImpl
- All Implemented Interfaces:
EmailValidator
,Validator
,ValueValidator
,Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.validate.api.validators.Validator
Validator.MergeMode
-
Field Summary
Fields inherited from class ch.tocco.nice2.validate.api.validators.AbstractValidator
doContinue, level, name, negate, runOn
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected FieldValidationResult
boolean
Tells if the constraint data of this validator can be merged with another instance.clone()
Class
<? extends ValueValidator> getType()
protected boolean
If subclass overwrites and returns true then the validate() method won't do it anymore.void
init()
Methods inherited from class ch.tocco.nice2.validate.api.validators.AbstractValidator
doContinueOnFailure, doNegate, getErrorStatusByLevel, getLevel, getName, getRunOn, hasName, isEmptySoIgnore, mergeConstraints, negateResultIfNeeded, setContinue, setLevel, setName, setNegate, setRunOn, validate
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.validate.api.validators.Validator
doContinueOnFailure, doNegate, getLevel, getName, getRunOn, hasName, mergeConstraints, setContinue, setLevel, setName, setNegate, setRunOn, validate
-
Constructor Details
-
EmailValidatorImpl
public EmailValidatorImpl()
-
-
Method Details
-
init
public void init()- Specified by:
init
in interfaceEmailValidator
-
_validate
protected FieldValidationResult _validate(Object value, Map<String, Object> fields) throws IllegalArgumentException- Specified by:
_validate
in classAbstractValidator
- Throws:
IllegalArgumentException
-
iNegateMyself
protected boolean iNegateMyself()Description copied from class:AbstractValidator
If subclass overwrites and returns true then the validate() method won't do it anymore. That's preferred for implementing validators (not groups).- Overrides:
iNegateMyself
in classAbstractValidator
- See Also:
-
canMergeConstraints
public boolean canMergeConstraints()Description copied from interface:Validator
Tells if the constraint data of this validator can be merged with another instance.This is validator-type specific. For example a date range validator can, a regex validator obviously cannot.
- Specified by:
canMergeConstraints
in interfaceValidator
- See Also:
-
getType
-
clone
- Specified by:
clone
in interfaceValidator
- Overrides:
clone
in classAbstractValidator
- Throws:
CloneNotSupportedException
-