Fixes in get errors from checked fields

This commit is contained in:
Antonio de la Rosa 2016-11-13 17:26:46 +01:00
parent 4cb8820a2b
commit e072fa9fc5
3 changed files with 5 additions and 2 deletions

View file

@ -42,7 +42,7 @@ class NormalizeField extends TextField {
static public function check_text($value, $separator='-') static public function check_text($value, $separator='-')
{ {
$str_normalize=slugify(strip_tags($value)); $str_normalize=PhangoApp\PhaUtils\Utils::slugify(strip_tags($value));
$arr_normalize=explode($separator, $str_normalize); $arr_normalize=explode($separator, $str_normalize);
@ -56,4 +56,4 @@ class NormalizeField extends TextField {
} }
?> ?>

View file

@ -193,6 +193,7 @@ class PhangoField {
/** /**
* This method is used for simple checking, used for WhereSql. * This method is used for simple checking, used for WhereSql.
* @warning DEPRECATED
*/ */
public function simple_check($value) public function simple_check($value)

View file

@ -2061,6 +2061,8 @@ class Webmodel {
$arr_std_error[]=I18n::lang('error_model', 'check_error_field_required', 'Error: Field required').' '.$key.' '; $arr_std_error[]=I18n::lang('error_model', 'check_error_field_required', 'Error: Field required').' '.$key.' ';
$this->components[$key]->error=1;
if($this->components[$key]->std_error=='') if($this->components[$key]->std_error=='')
{ {