News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

SaniSoft Blog:
Multiple validation rules per model field while baking
0 comments :: posted Tuesday April 29, 2008 @ 16:12:44
voice your opinion now!

If you're a CakePHP user and have been frustrated by how this "bake" functionality doesn't allow for more than one validation rule on a given field, check out the new post on the SaniSoft blog (from Amit Badkas):

This is not much of a problem if you have only a few models but when you start to work on several dozen models in a project it becomes very tedious to open each and every model file to make changes.

The result of his frustration has come out in the form of a patch as a part of a new ticket in the CakePHP request submission process.

tagged with: bake cakephp framework multiple validation rule patch feature


PHPBuilder.com:
PHP Form Validation System An Object-Oriented Approach
0 comments :: posted Monday April 21, 2008 @ 08:49:24
voice your opinion now!

Mike Weiner has put together an article for PHPBuilder.com that's posted today showing a bit more object-oriented solution to validating the user submitted data in your forms:

Whether it is for database submission, emailing, or for some other purpose, forms represent the primary means of enabling a user to send data to an application. As a result, it is important to have control over the data collected by your forms, which will aid in the creation of streamlined, error-free applications.

He lays out the validation method in a graphic going with a generic validation class that then calls the various validation methods (like phone or email) as needed. The "validation set" manages which validations are to be run on which form elements. Example code for each of the bits making up the structure and the implementation are provided.

tagged with: object oriented approach form validation tutorial

Greg Szorc's Blog:
Using DTD's and Catalogs for XHTML Validation
0 comments :: posted Thursday April 10, 2008 @ 11:29:48
voice your opinion now!

Greg Szorc shows how, in this entry on his blog, to use DTDs and catalogs to validate your XHTML pages with a little help from PHP.

This [validation from an external site like the W3C validator] approach is a good start, but it is far from ideal because it is based on an honor system of sorts. You often forget to validate each change you make and there is always some corner case that you forget. So, what can be done about it? Well, if you find yourself developing in PHP, you can employ the following solution.

The code he includes pulls in the XHTML content from your page (or the output of the framework's view layer) and pushes it into a DOMDocument that's build with the LIBXML_DTDLOAD and LIBXML_DTDATTR options.

tagged with: html validation dom extension document import

Chris Hartjes' Blog:
Simple User Registration in CakePHP 1.2, Part II
0 comments :: posted Wednesday January 23, 2008 @ 09:36:00
voice your opinion now!

Chris Hartjes has followed up on a previous post about user authentication in CakePHP with a few more comments in part two.

I got a question in the comments about my previous post on simple user registration about how to do some of the necessary validation for registration in the model. I thought I'd show some code I did to do exactly that.

He includes the code for his example with the key, he explains, being the use of a second field (the confirm password field) to do the validation.

tagged with: user registration cakephp validation confirm field


conference database PHP5 zend book zendframework releases framework developer application ajax mysql pecl security release PEAR cakephp job package code

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework