validator에 errorStr 함수로 묶어서 보여주는 기능 추가
This commit is contained in:
1 parent
b732b9bf40
commit
9c19e4e92b
1 file changed
+7
@@ -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