Sharing technology, ideas, insights!
Call: +91 710 466 0336         Email: hello@sanisoft.com

Blog

Multiple validation rules per model field while baking

This patch is no longer needed. The functionality has been incorporated into bake

Bake does a good job of creating models and validations. However, bake does not allow for multiple validation rules on a single field. 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.

There has been an enhancement request ticket for allowing multiple validation rules open since three months but I needed the feature NOW()

And if in open source you need something now, you code it yourself and that’s what I did. Now, I can bake models with multiple validation rules and this is how it looks

Mutiple validations per field while baking

I have submitted a patch for this to the above ticket. If you like me want the feature now, download the patch here. This patch works for the latest SVN checkout

About the Author

Amit Badkas is Zend certified PHP5 and Zend Framework engineer, and has been working in SANIsoft for past 10 years, his present designation is 'Technical Manager'

2 comments

Leave a Reply