变更
This commit is contained in:
+3
-3
@@ -35,9 +35,9 @@ class LengthValidator extends BaseValidator
|
||||
}
|
||||
}
|
||||
return match ($method) {
|
||||
self::MAX_LENGTH => $this->maxLength($field, $value),
|
||||
self::MIN_LENGTH => $this->minLength($field, $value),
|
||||
default => $this->defaultLength($field, $value),
|
||||
self::MAX_LENGTH => $this->maxLength($field, (string)$value),
|
||||
self::MIN_LENGTH => $this->minLength($field, (string)$value),
|
||||
default => $this->defaultLength($field, (string)$value),
|
||||
};
|
||||
}, $this->params, strtolower($this->method), $this->value);
|
||||
}
|
||||
|
||||
+2
-2
@@ -87,11 +87,11 @@ class Validator extends BaseValidator
|
||||
'class' => 'validator\TypesOfValidator',
|
||||
'method' => TypesOfValidator::SERIALIZE,
|
||||
],
|
||||
'maxLength' => [
|
||||
'maxlength' => [
|
||||
'class' => 'validator\LengthValidator',
|
||||
'method' => 'max',
|
||||
],
|
||||
'minLength' => [
|
||||
'minlength' => [
|
||||
'class' => 'validator\LengthValidator',
|
||||
'method' => 'min',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user