mothership-ec / cog

Cog
Other
2 stars 3 forks source link

Validator trait #488

Closed thomasjthomasj closed 8 years ago

thomasjthomasj commented 8 years ago

This PR adds a new helper trait called the ValidatorTrait to validate variables in ways that I find myself having to write manually over and over and over again. It will throw a special InvalidVariableException class to be thrown if the validation is unsuccessful.

Please check that it is fully unit tested.

It has the following public methods: