src/Forms/Form.php
protected function getFormMessages(array $fields)
    {
        // Each message is defined by field and its own rules.
        // In our case, we need to prepend the field name (attribute)
        // using a "dot" notation. Ex.: email.required
        $messages = [];

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

        return $messages;
    }
protected function getFormMessages(array $fields)
    {
        // Each message is defined by field and its own rules.
        // In our case, we need to prepend the field name (attribute)
        // using a "dot" notation. Ex.: email.required
        $messages = [];

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

        return $messages;
    }
protected function getFormMessages ( array $ fields ) { // Each message is defined by field and its own rules. // In our case, we need to prepend the field name (attribute) // using a "dot" notation. Ex.: email.required $ messages = [ ] ; foreach ( $ fields as $ field ) { /** @var FieldTypeInterface $field */ foreach ( $ field -> getOption ( 'messages' ) as $ attr => $ message ) { $ messages [ $ field -> getName ( ) . '.' . $ attr ] = $ message ; } } return $ messages ; }
Get the list of form fields messages.

@param array $fields The form fields instances.

@return array
Get the list of form fields messages .