I had an issue while using the $xxxRules properties since they cannot contains methods in their declaration. And considering that some validators can be created through the Illuminate\Validation\Rule class to be given some more parameters, I had to support some sort of a method to generate rules.
This pull request adds the support to methods with the naming generateXxxxRules(), without modifying the core.
I had an issue while using the $xxxRules properties since they cannot contains methods in their declaration. And considering that some validators can be created through the Illuminate\Validation\Rule class to be given some more parameters, I had to support some sort of a method to generate rules.
This pull request adds the support to methods with the naming generateXxxxRules(), without modifying the core.
Example :
This PR was tested in context and added to the unit testing.