US2FormValidator icon indicating copy to clipboard operation
US2FormValidator copied to clipboard

US2ValidatorTextField doesn't always forward delegate.

Open markst opened this issue 12 years ago • 3 comments

If I'm using US2ValidatorTextField with a validator which allows violation & validates during focus, the UITextFieldDelegate "shouldChangeCharactersInRange" never gets passed on.

markst avatar Oct 25 '13 02:10 markst

I'm seeing what I can assume is a similar issues when using US2ValidateTextField, I'll have to dig more into this. But has anything else been determined about this?

joelash avatar Nov 13 '13 15:11 joelash

Will have a look soon.

martinstolz avatar Nov 27 '13 11:11 martinstolz

I encountered something similar. I'm guessing it's because of this line of code. https://github.com/ustwo/US2FormValidator/blob/dd6f49b912e3205328f9d25bee081247662d2523/US2FormValidationFramework/source/base/US2ValidatorTextFieldPrivate.m#L66

It doesn't seem like a bug to me. If you set shouldAllowViolations to YES on the text field and shouldAllowViolation on the condition, the delegate gets called. I think this is the whole point of properties like shouldAllowViolations.

jyiin avatar Jan 07 '15 02:01 jyiin