Welcome Guest, Not a member yet? Register   Sign In
Label in Form Validation
#10

(This post was last modified: 11-15-2017, 07:09 PM by averroez.)

I think an alternative syntax to what we have would be more user friendly

PHP Code:
$validation->setRule('first_name''required', [
  
'label' => 'First Name',
  
'errors' => [ 'required' => 'The {attribute} field is required.' ]
]);
// or single rule per call like so, bit more verbose
$validation->setRule(['first_name''required'
  
'message' => 'The first name is required.' 
]); 
Reply


Messages In This Thread
Label in Form Validation - by Flavio Cesarino - 11-08-2017, 01:05 PM
RE: Label in Form Validation - by InsiteFX - 11-09-2017, 03:37 AM
RE: Label in Form Validation - by Flavio Cesarino - 11-09-2017, 05:31 AM
RE: Label in Form Validation - by Flavio Cesarino - 11-09-2017, 08:52 AM
RE: Label in Form Validation - by donpwinston - 11-09-2017, 11:09 AM
RE: Label in Form Validation - by Flavio Cesarino - 11-09-2017, 01:36 PM
RE: Label in Form Validation - by donpwinston - 11-09-2017, 02:29 PM
RE: Label in Form Validation - by Flavio Cesarino - 11-09-2017, 02:30 PM
RE: Label in Form Validation - by kilishan - 11-09-2017, 02:40 PM
RE: Label in Form Validation - by averroez - 11-15-2017, 12:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB