Skip to content

Instantly share code, notes, and snippets.

@Himan95
Created January 27, 2017 11:20
Show Gist options
  • Save Himan95/cdc46230b5ab471b24bcd4dfbbeda82c to your computer and use it in GitHub Desktop.
Save Himan95/cdc46230b5ab471b24bcd4dfbbeda82c to your computer and use it in GitHub Desktop.
Rules
Donor
public $rules = [
'name' => 'required',
'dob' => 'required|date|before:-18 years',
'address' => 'required',
'map_lat' => 'required',
'map_lng' => 'required',
'contact_no' => 'required|digits:value=10',
'blood_type' => 'required',
];
Hospital
public $rules = [
'name' => 'required',
'reg_no' => 'required',
'contact_no' => 'required|digits:value=10',
'address' => 'required',
'map_lat' => 'required',
'map_lng' => 'required',
];
@jimut
Copy link

jimut commented Jan 27, 2017

'contact_no' => 'required|digits:10' It will be like this. Other than that everything is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment