Welcome Guest, Not a member yet? Register   Sign In
How to validate field with brackets in name
#1

(This post was last modified: 09-07-2022, 03:13 AM by groovebird.)

Hi,

i have 3 radio buttons with the following name:

radio name="button[10]" value="15"
radio name="button[10]" value="16"
radio name="button[10]" value="17"

This is the rule:

PHP Code:
$rules = [
  
'button[10]' => [
    
'label' => '',
    
'rules' => 'required',
    
'errors' => [
      
'required' => 'Please check the radio button'
    
]
  ]
]; 

If i check one radiobutton the error message is still displayed. what i am doing wrong?
Reply


Messages In This Thread
How to validate field with brackets in name - by groovebird - 09-07-2022, 02:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB