Open secrethash opened 7 years ago
Ah yes, this is an issue which I didn't anticipate. The problem is that callingCode is an array, but all other fields under the rules validation is just basic fields, I can't remember if we ever checked for that.
This is actually poor naming as callingCode should have been callingCodes.
It should be easy to fix the error. We just have to extend how it generates the validations so it supports properties which are arrays too. https://github.com/antonioribeiro/countries/blob/master/src/package/ServiceProvider.php#L102-L115
Is this still something you need?
The country code must be a valid callingCode.
This is the validation error generated when I am trying to Implement Calling Code Validation in my app. Country Validation works perfectly fine but Calling Code does not. Below is my Implementation:File:
config\countries.php
File: `app\Http\Controllers...Controller.php
Note:
country
field is being successfully validated butcountry_code
is not.