src/Forms/Form.php
protected function getFormRules(array $fields)
    {
        $rules = [];

        foreach ($fields as $field) {
            /** @var FieldTypeInterface $field */
            $rules[$field->getName()] = $field->getOption('rules');
        }

        return $rules;
    }
protected function getFormRules(array $fields)
    {
        $rules = [];

        foreach ($fields as $field) {
            /** @var FieldTypeInterface $field */
            $rules[$field->getName()] = $field->getOption('rules');
        }

        return $rules;
    }
protected function getFormRules ( array $ fields ) { $ rules = [ ] ; foreach ( $ fields as $ field ) { /** @var FieldTypeInterface $field */ $ rules [ $ field -> getName ( ) ] = $ field -> getOption ( 'rules' ) ; } return $ rules ; }
Get the list of form rules.

@param array $fields The form fields instances.

@return array
Get the list of form rules .