Poor validation is a key weakness many scripts are guilty of, enabling security exploits. The Validate package can be used to validate any data, and is especially useful for validating user input.
There are also related packages that apply specific validation rules according to geographic location. I don't cover these packages in this article, though once you've grasped the basics of the main Validate package, using these won't present much of a challenge.
They introduce the package by showing a quick install of it, including dependencies. From there, it's examples of different validation types:
- email addresses
And it wouldn't be a tutorial without some code, so for each example there's a snippet or two and a breakdown of its usage.