- java.lang.Object
-
- io.github.mmm.validation.AbstractValidator<V>
-
- io.github.mmm.validation.AbstractValueValidator<Object>
-
- io.github.mmm.validation.main.ValidatorMandatory
-
- All Implemented Interfaces:
io.github.mmm.base.lang.Composable<Validator<?>>,Validator<Object>,Iterable<Validator<?>>
public class ValidatorMandatory extends AbstractValueValidator<Object>
Validatorvalidating that a mandatory value is filled.ValidationResultwill be invalid if the value is not provided (empty, blank,null).- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringID-
Fields inherited from interface io.github.mmm.validation.Validator
ID_MANDATORY
-
-
Constructor Summary
Constructors Constructor Description ValidatorMandatory()The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ValidatorMandatoryget()StringgetId()booleanisMandatory()protected io.github.mmm.nls.NlsMessagevalidateNotNull(Object value)protected io.github.mmm.nls.NlsMessagevalidateNull()-
Methods inherited from class io.github.mmm.validation.AbstractValueValidator
validate
-
Methods inherited from class io.github.mmm.validation.AbstractValidator
equals, hashCode, isDynamic, source2string, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.github.mmm.base.lang.Composable
getChild, getChildCount, iterator
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
ID
public static final String ID
- See Also:
getId(), Constant Field Values
-
-
Method Detail
-
getId
public String getId()
-
get
public static ValidatorMandatory get()
- Returns:
- the singleton instance of this class.
-
validateNull
protected io.github.mmm.nls.NlsMessage validateNull()
- Overrides:
validateNullin classAbstractValueValidator<Object>
-
validateNotNull
protected io.github.mmm.nls.NlsMessage validateNotNull(Object value)
- Specified by:
validateNotNullin classAbstractValueValidator<Object>
-
isMandatory
public final boolean isMandatory()
-
-