lundi 27 avril 2015

pattern for return values

In validate methods what kind of return types or return value patterns are preferred?

If a validate function returns success/failure and failed fields as a result, should the function return, array with {true/false, array of error fields]} or true on success and array of error fields in case of failure

Aucun commentaire:

Enregistrer un commentaire