Home arrow PHP arrow A PHP Validation Helper Class in Action

A PHP Validation Helper Class in Action

If youíre an enthusiastic PHP developer interested in learning how to build helper classes, you've come to the right place. This article series will teach you in a few simple steps how to build several kinds of helper classes for manipulating strings, generating dynamic URLs and validate incoming data, and so forth.

  1. A PHP Validation Helper Class in Action
  2. Review: the previous ValidatorHelper class
  3. Checking integers and float numbers with the ValidatorHelper
  4. Validating alphabetic and alphanumeric values, IP and e-mail addresses, and URLs
By: Alejandro Gervasio
Rating: starstarstarstarstar / 3
August 31, 2009

print this article



Welcome to the penultimate tutorial of the series on building helpers in PHP 5. Comprised of eight articles, this series provides you with the basic pointers to start creating your own helper classes with minor hassles, and complements the corresponding theory with a great variety of hands-on examples.

And now that you've been introduced to the aim of this series of articles, itís time to review the topics that were treated in the last part. In that installment I finished building a simple helper class that could validate different types of data, including numeric and float numbers, IP and email addresses, and URLs as well.

The functionality of each method of this class was based mostly on PHP filters, since this extension not only permits you to perform a decent validation on incoming data, but it makes this a no-brainer process.

However, if youíre anything like me, then you may want to see how this validation helper class can be used in concrete situations, right? Well, in this tutorial Iím going to develop some basic examples that will illustrate the real capabilities of the class for verifying all the types of data mentioned above.

So, now itís time to leave the preliminaries behind us and start evaluating this sample helper class through some concrete and easy-to-grasp examples. Letís jump in!

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: