Welcome Guest, Not a member yet? Register   Sign In
Bug? Form Validation and fields with brackets
#1

Hi,

i have a textfield and radiobutton with [] in the name to validate.

The rules are
PHP Code:
public $group1 = [
        'textfield.*' => [
            'label' => '...',
            'rules' => 'required'
        ],
    ];

public 
$group2 = [
        'radiobutton.*' => [
            'label' => '...',
            'rules' => 'required'
        ],
    ]; 

Via getErrors() i can see the generated error messages. For the textfield the key in the array is transformed to textfield.0 but for the radiobutton the key is still radiobutton.*. Under my radiobutton in the template there is no output of the message:
PHP Code:
showError('textfield.' $i// is working
showError('radiobutton.' $i// is not working 

Is this a bug? Otherwise how can i get the correct key -> radiobutton.0 instead of radiobutton.*?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB