Validation Rules

I was wondering if anyone has ran into any performance issues/drawbacks and what is the best practice when generating validation rules. I currently group all of the rules together as much as possible and it’s really hard to tell what attributes have what rules without reading every rule every time and I would like to separate them. I haven’t ran test but what are your thoughts?

For example I currently do the following





[['title', 'name'], 'required'],

[['title', 'name'], 'string','min'=>2,'max'=>100],



it is much easier to read and maintain like this





//name

['name', 'required'],

['name', 'string','min'=>2,'max'=>100],

//title

['title', 'required'],

['title', 'string','min'=>2,'max'=>100],

//another attribute



Second variant is pretty easier to read. Use it