Welcome Guest, Not a member yet? Register   Sign In
How to set validation rules for all fields.
#1

Hello,

I have more than 20+ fields where the values are required. so manually adding one by one to the property like :


PHP Code:
  protected $validationRules = [

        'first_name' => ['required'],
        'last_name' => ['required'],

    ]; 


Is there any other alternative way to do this for all ?
Reply


Messages In This Thread
How to set validation rules for all fields. - by sknair143 - 09-04-2023, 10:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB