So, I have a client that's been reading about Laravel validation rules.
They currently have a settings screen that manages a very basic store of keys and values. i.e. "max free samples" = 10, "login attempts" = 5 etc.
They came up with a pretty interesting idea.
For each setting, they'd like to use any of the Laravel built in rules and type these in themselves. Now, when they create a setting they'd enter the key, value and populate a rules field. i.e.
Key = Max of something
Value = 100
Rules = required|integer|max:500
I've already implemented this and everything works. However, at the moment it's very dependent upon the client following the Larvel Docs. If they were to enter in a invalid rules a
BadMethodCall exception is thrown - which due to the fact I'm using form requests and the way the Validation instance is bound to the ioc, isn't immediately obvious how I can catch this.
To save some time, is anyone aware of a good package that can validate the validation rules. i.e.
required|email would be valid, whereas
requireddd|asijdha would of course be invalid. There is also the issues of rules with parameters like