Hi Riccardo, On 23 May 2017, at 19:03, Riccardo De Menna <deme...@tuorlo.net> wrote:
> What should I do to avoid this? I don’t think I’d do it at all. This sounds like a bogus use of NSValidation, for at least the reason you’ve already detailed: it’s not idempotent. Surely if a call to validateValueForKey() returns a value that’s declared valid for the property, then a further call should just return that valid value unchanged. Obviously that’s what you’re trying to simulate, but even if you can detect a value that’s been hashed already, why wouldn’t _that hash_ be a valid plaintext password itself? > One idea would be to intercept component validation on > validateTakeValueForKeyPath and skip coercion there. Or skip it later on the > validateForSave. > > What would be the right way? Also… is it somehow guaranteed that validation > happens twice? Could it happen three times? More? If so, my idea would not > work. I imagine it could happen an arbitrary number of times if validation repeatedly fails for some unrelated reason and you allow the user to re-submit the form. > What do you think? Do it some other way. -- Paul Hoadley http://logicsquad.net/ https://www.linkedin.com/company/logic-squad/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com