Skip to content

Commit af22a26

Browse files
committed
typo
1 parent 9467964 commit af22a26

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Forms/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class Rule
3131
/** @var bool */
3232
public $isNegative = false;
3333

34-
/** @var string */
34+
/** @var string|null */
3535
public $message;
3636

37-
/** @var Rules for conditions */
37+
/** @var Rules|null for conditions */
3838
public $branch;
3939
}

src/Forms/Rules.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function __construct(IControl $control)
5454
public function setRequired($value = true)
5555
{
5656
if ($value) {
57-
$this->addRule(Form::REQUIRED, $value === true ? null : $value);
57+
$this->addRule(Form::FILLED, $value === true ? null : $value);
5858
} else {
5959
$this->required = null;
6060
}
@@ -88,7 +88,7 @@ public function addRule($validator, $errorMessage = null, $arg = null)
8888
$this->adjustOperation($rule);
8989
$rule->arg = $arg;
9090
$rule->message = $errorMessage;
91-
if ($rule->validator === Form::REQUIRED) {
91+
if ($rule->validator === Form::FILLED) {
9292
$this->required = $rule;
9393
} else {
9494
$this->rules[] = $rule;
@@ -104,7 +104,7 @@ public function addRule($validator, $errorMessage = null, $arg = null)
104104
*/
105105
public function removeRule($validator)
106106
{
107-
if ($validator === Form::REQUIRED) {
107+
if ($validator === Form::FILLED) {
108108
$this->required = null;
109109
} else {
110110
foreach ($this->rules as $i => $rule) {

0 commit comments

Comments
 (0)