Explorar o código

Update:校验为0的情况

Jinhui Zhu %!s(int64=5) %!d(string=hai) anos
pai
achega
486aed87fd
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/Library/Validate.php

+ 1 - 0
src/Library/Validate.php

@@ -202,6 +202,7 @@ class Validate
 	public function required($str)
 	{
 		if (is_array($str)) return !empty($str);
+		if ($this->number($str)) return true;
 		return trim($str) != "";
 	}