This commit is contained in:
2020-10-29 18:17:25 +08:00
parent 6839b64be8
commit 53ae43b79b
198 changed files with 708 additions and 850 deletions
+2 -3
View File
@@ -5,6 +5,7 @@
* Date: 2018/4/3 0003
* Time: 17:04
*/
declare(strict_types=1);
namespace validator;
@@ -17,7 +18,7 @@ class LengthValidator extends BaseValidator
public $method;
public $value;
public int $value;
/**
* @return bool
@@ -39,10 +40,8 @@ class LengthValidator extends BaseValidator
switch (strtolower($this->method)) {
case self::MAX_LENGTH:
return $this->maxLength($value);
break;
case self::MIN_LENGTH:
return $this->minLength($value);
break;
default:
return $this->defaultLength($value);
}