mirror of
https://github.com/shadoll/sLetter.git
synced 2025-12-20 03:27:00 +00:00
gump validator
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* @author sHa <sha@shadoll.com>
|
* @author sHa <sha@shadoll.com>
|
||||||
* @package sLetter
|
* @package sLetter
|
||||||
* @version 18.2.13-7
|
* @version 18.2.13-8
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -132,12 +132,11 @@ class sLetter{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function validate($data,$return=false){
|
function validate($data,$return=false){
|
||||||
if(!empty($data) && is_array($data))
|
$is_valid = GUMP::is_valid($this->fields, $data);
|
||||||
foreach($data as $val)
|
if($is_valid !== true){
|
||||||
if(empty($val)){
|
$this->error = true;
|
||||||
$this->error = true;
|
$this->status = $is_valid;
|
||||||
$this->status = "Empty value";
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $return?$this->error:$this;
|
return $return?$this->error:$this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user