|
const | TAG_REGEX = '/^([ÄäÜüÖöß\sa-zA-Z0-9]+,)*[ÄäÜüÖöß\sa-zA-Z0-9]+$/' |
|
| $errors = [] |
|
Definition at line 8 of file Rule.php.
Paperyard\Models\Rule\Rule::setIsActiveAttribute |
( |
|
$value | ) |
|
Mutates post data reliable.
- Parameters
-
Definition at line 32 of file Rule.php.
34 $this->attributes[
'isActive'] = (int)($value ==
'on');
Paperyard\Models\Rule\Rule::validate |
( |
| ) |
|
|
private |
Checks if data matches rule set.
Definition at line 40 of file Rule.php.
43 $validator =
new Validator($this->getAttributes());
46 $validator->rules($this->rules);
49 $validator->labels($this->labels);
52 if(!$validator->validate()) {
53 $this->errors = $validator->errors();
Paperyard\Models\Rule\Rule::validateAndSave |
( |
| ) |
|
Saves data if it matches rule set.
- Returns
- bool
Definition at line 62 of file Rule.php.
68 if(empty($this->errors)) {
Paperyard\Models\Rule\Rule::validateAndUpdate |
( |
| ) |
|
Updates data if it matches rule set.
- Returns
- bool
Definition at line 80 of file Rule.php.
86 if(empty($this->errors)) {
87 return $this->update();
Paperyard\Models\Rule\Rule::$attributes |
|
protected |
Initial value:= array(
'isActive' => 0
)
Definition at line 14 of file Rule.php.
Paperyard\Models\Rule\Rule::$errors = [] |
Paperyard\Models\Rule\Rule::$labels |
|
protected |
Paperyard\Models\Rule\Rule::$rules |
|
protected |
const Paperyard\Models\Rule\Rule::TAG_REGEX = '/^([ÄäÜüÖöß\sa-zA-Z0-9]+,)*[ÄäÜüÖöß\sa-zA-Z0-9]+$/' |
matches Alphanum, special german chars
Definition at line 11 of file Rule.php.
The documentation for this class was generated from the following file:
- paperyard/paperyard/frontend/models/rule/Rule.php