Today, you have a couple of options:
A. Use the attribute system. Then you can use some macros. There are some things you can't define with macros so you will need to define this per-entity/field. After all, very often the definition of some field doesn't define its validation rule: you may have a field with length 50, but maybe you need to reduce it to 30 in validation, etc.
B. You can write a custom template that generate buddy classes where you can define such attributes via the template language. Example: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=19498
Additionally you can write your own Setting system, so you can set custom settings in your entity/field and interpret that in your custom template. For example you could define a RegularExpressionToValidate setting and use it in your fields so you can use that information to generate custom code. (more info...).
costab wrote:
It looks like it's coming. When can we get our hands on version 3.5
I don't have a real estimate for 3.5. I will ask.