Form validation is_unique: valid if value is in current row, invalid on any other row |
(01-24-2022, 08:41 AM)iRedds Wrote: https://www.php.net/manual/en/language.o...erties.phpThanks iRedds, I missed this one. I initialize $this->validationRules in my constructor now and the message has disappeared. I followed the in model validation on https://codeigniter.com/user_guide/model...ating-data where the notation {id} is suggested (and apparently, this notation CAN be used in class property / so doesn't need to be set in the constructor). But still, the is_unique() validation rule was not ignored during update for the given id... My mistake: I forgot to add a hidden field in the form holding the id value So: problem solved, thanks for the golden tip! |
Welcome Guest, Not a member yet? Register Sign In |