validator에 errorStr 함수로 묶어서 보여주는 기능 추가
This commit is contained in:
@@ -3,4 +3,11 @@ namespace sammo;
|
||||
|
||||
class Validator extends \Valitron\Validator{
|
||||
protected static $_lang = 'ko';
|
||||
|
||||
public function errorStr(){
|
||||
$errors = array_values((array)$this->errors());
|
||||
$errors = array_map(function($value){return join(', ', $value);}, $errors);
|
||||
$errors = join(', ', $errors);
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user