Phly_InputFilter

Summary

Phly_InputFilter is a simple, extendible validation and normalization class for handling user input.

License

BSD

Current Release

Description

Phly_InputFilter is a simple, extendible validation and normalization class for handling user input. While it contains many validations and several normalizations internally, you may extend the class to add whatever custom actions you need.

Validation and normalization can be performed on single values by calling the appropriate function, or you may create a queue of validations/normalizations by using the addValidation() and addNormalization() methods, followed by calling the run() method with an array of values to test. In this latter method, you will receive either false (indicating validations failed), or an array of 'clean' values, post normalization.

Maintainers