Tuesday, August 9, 2011

Linked Required Fields

This came up today as something that is a very basic requirement when developing complex forms, but there was no way built in to Yii to handle it quickly and consistently across multiple models, so I created a custom validator for it. I hope it helps others to move forward quickly with their complex form development ;)


The need was that when a specific field was set or a specific value was selected for a field, additional fields would become required.

The solution? ChildrenRequiredValidator


http://www.yiiframework.com/extension/childrenrequiredvalidator/

Any feedback or suggestions are more than welcome!

Friday, August 5, 2011

Using GIT to control your production releases

In the process of looking up some documentation for work, I came across this article and I think it does a fantastic job of explaining a solid git development workflow and thought I should share it. Enjoy!!

http://nvie.com/posts/a-successful-git-branching-model/

Monday, August 1, 2011

Keeping your Yii Models Lean - Use Behaviors

Active Record models are fantastic for consolidating "black box" logic and keeping your models self-aware of their business logic, but what do you do when the business rules and object specific operations keep adding up?

Do yourself a favor, and get into the habit of putting those business logic methods into attachable behaviors.