2

From my time working with Ruby On rails, there is a couple different packaged/projects out there to manage both validation and error reporting in an extensible way.

Self-studying Python Pylons I just got introduced to HTMLFill which so far seems like an elegant solution to a common task of form validation.

I know both examples are features of Frameworks, or in the case of HTMLFill, intended to be part of a framework... still I don't remember seeing anything remotely as well polished in cakephp, code igniter, or even Zend framework. Am I missing something out there, or would it be worth while to attempt to imitate Python's HTMLFill in PHP5?

disclaimers: I've written Ajax based form validation systems that rely on embedding metadata like class="data-required data-email" and like but they've always seemed clunky to me.

I believe in the fat model philosophy of data validation, with the HTMLFill example above, I plan on packing my models with common HTMLFill schemes to each model, as is possible.

Links: HTMLFill - http://www.formencode.org/htmlfill.html#introduction

2 Answers 2

3

The Zebra Form library is pretty nice and automatically generates javascript to do client-side validation as well.

http://stefangabos.ro/php-libraries/zebra-form/

Sign up to request clarification or add additional context in comments.

Comments

1

The Zend Framework has the Zend_Validate class, it provides you a basic set of validators, you have also the Zend_Filter_Input class for data filtering, validation and escaping.

I've also used Propel ORM Validation Framework to do validation at the model level.

You can also enforce validation at the client side level, I recommend you the jQuery Validation plugin, it works really good...

1 Comment

The jQuery library seems pretty interesting, but not quite what I'm looking for. Zend Validate seems closer to my ideal with HTMLFill plus I've had experience ripping things out of Zend for my own use.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.