mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Use ModelValidator::count() to count dynamiclly added validation rules
This commit is contained in:
parent
8b21710c95
commit
5937685817
1 changed files with 1 additions and 1 deletions
|
@ -218,7 +218,7 @@ class FormHelper extends AppHelper {
|
|||
|
||||
if ($key === 'validates' && !isset($this->fieldset[$model]['validates'])) {
|
||||
$validates = array();
|
||||
if (!empty($object->validate)) {
|
||||
if ($object->validator()->count() > 0) {
|
||||
foreach ($object->validator() as $validateField => $validateProperties) {
|
||||
if ($this->_isRequiredField($validateProperties)) {
|
||||
$validates[$validateField] = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue