I'm currently making a crud for managing users, I'm validating the password/password repeat fields upon creation. However on the edit screen I would want these fields to be emtpy and allowed to be empty and only overwrite the password fields or validate them when the user fills them in, thus setting a new password.
Does anyone know a working example of this functionality or how to achieve this:
- load form fields (set) empty
- ByPass validation if empty (not just edit)
- Don't overwrite the record upon saving if its empty, but do overwrite re validate if filled
To post all involved code will be lenghty so here is a link to the souce on bitbucket: https://bitbucket.org/Meint-Willem/phalcon-time/src/ (work in progress)
Thanks in advance for any help