• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
single error message for all the validations?

#1
Hi, take a look at the code:
PHP Code:
[
        
'field'  => 'action',
        
'label'  => 'in',
        
'rules'  => 'required|alpha|max_length[5]',
        
'errors' => [
            
'required'   => 'Something missing!',
            
'alpha'      => 'Something missing!',
            
'max_length' => 'Something missing!'
        
]
    ] 

as you can already guess that i am trying to hide the default error messages and override each of them with a custom string, is there any way to do it once? Like this:
PHP Code:
[
        
'field'  => 'action',
        
'label'  => 'in',
        
'rules'  => 'required|alpha|max_length[5]',
        
'default_error' => 'Something missing!';
    ] 
Reply


Messages In This Thread
single error message for all the validations? - by rakibtg - 01-07-2016, 03:31 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.