@@ -257,10 +257,10 @@ public function validate(array $onlyChecked = [], bool $stopOnError = null)
257
257
}
258
258
259
259
/**
260
- * field require Validate 字段存在检查
260
+ * field require/exists validate 字段存在检查
261
261
* @param string $field Attribute name
262
262
* @param mixed $value Attribute value
263
- * @param string $validator required* 验证器
263
+ * @param string $validator required* Validator name
264
264
* @param array $args Verify the required parameters
265
265
* @param string|array $defMsg
266
266
* @return bool|null
@@ -279,7 +279,7 @@ protected function fieldValidate(string $field, $value, string $validator, array
279
279
} elseif (self ::isCheckFile ($ validator )) {
280
280
$ passed = $ this ->$ validator ($ field , ...\array_values ($ args ));
281
281
282
- // 其他 required* 方法
282
+ // other required* methods
283
283
} elseif (\method_exists ($ this , $ validator )) {
284
284
$ passed = $ this ->$ validator ($ field , $ value , ...\array_values ($ args ));
285
285
} else {
@@ -301,11 +301,11 @@ protected function fieldValidate(string $field, $value, string $validator, array
301
301
}
302
302
303
303
/**
304
- * value Validate 字段值验证
305
- * @param string $field 属性名称
306
- * @param mixed $value 属性值
307
- * @param \Closure|string|mixed $validator 验证器
308
- * @param array $args 验证需要的参数
304
+ * field value validate 字段值验证
305
+ * @param string $field Field name
306
+ * @param mixed $value Field value
307
+ * @param \Closure|string|mixed $validator Validator
308
+ * @param array $args Arguments for validate
309
309
* @param string $defMsg
310
310
* @return bool
311
311
* @throws \InvalidArgumentException
@@ -466,7 +466,7 @@ protected function prepareRule(array &$rule)
466
466
case 'between ' :
467
467
// fixed: 当只有 max 时,自动补充一个 min
468
468
if (isset ($ rule ['max ' ]) && !isset ($ rule ['min ' ])) {
469
- $ rule ['min ' ] = PHP_INT_MIN ;
469
+ $ rule ['min ' ] = \ PHP_INT_MIN ;
470
470
}
471
471
break ;
472
472
}
0 commit comments