EZForm icon indicating copy to clipboard operation
EZForm copied to clipboard

Preloaded data not validated by EZForm if validationMinCharacters > 0

Open ormast opened this issue 11 years ago • 2 comments

Hey Chris,

I'm trying to configure EZForm framework and have some issues. When I have some existing data in textfields after viewDidLoad, validation not working if textField.validationMinCharacters > 0. I've tracked updateValidityIndicatorForField method, it's sending null to isValid method. When I start typing something in this field, the validator starting work as expected. Can you point me to the right direction, where to fix it? Thank you

P.S. the textField already has valid data, but isValid returns null (FALSE)

ormast avatar Jun 25 '13 00:06 ormast

Hey Ormast,

How are you setting your existing values on your form field in viewDidLoad ?

You need to make sure you set the value of the field correctly, not just set the text on the UITextField.

If you're not using setFieldValue:canUpdateView: or setFieldValue: then try that.

If you are, then post some of your code and I'll try and help.

Cheers,

jessedc avatar Jun 25 '13 22:06 jessedc

@jessedc I had the same problem and using the setFieldValue:canUpdateView worked for me. Thanks!

nessalauren5 avatar Nov 09 '13 00:11 nessalauren5