33 $this->data_factory = $data_factory;
35 $this->lng->loadLanguageModule(self::LANGUAGE_MODULE);
83 public function or(array $others)
204 public function custom(callable $is_ok, $error)
isInt()
Get a constraint for an integer.
A constraint encodes some resrtictions on values.
custom(callable $is_ok, $error)
Get a custom constraint.
isArrayOf(Constraint $on_element)
Get a constraint for a array with constraint to all elements.
hasMinLength($min_length)
Get the constraint that some string has a minimum length.
isString()
Get a constraint for a string.
__construct(Data\Factory $data_factory, \ilLanguage $lng)
Factory constructor.
hasMaxLength($max_length)
Get the constraint that limits the maximum length of the string.
password()
Get the factory for password constraints.
isNull()
Get the constraint that some value is null.
greaterThan($min)
Get the constraint that some value is larger than $min.
isNumeric()
Get the constraint that some value is a number.
lessThan($max)
Get the constraint that some value is smaller then $max.
or(array $others)
Get a logical or constraint.
not(Constraint $other)
Get a negated constraint.
parallel(array $others)
Get a constraint that checks the supplied constraints in parallel.
sequential(array $others)
Get a constraint that sequentially checks the supplied constraints.