Eureka Form on edit validation

219 Views Asked by At

In Eureka Form framework, is there a way to validate text fields on edit like textfield delegate methods can do. For instance

I need to allow only strings that contain predefined set of characters and when user tries to enter an invalid character or paste a string that contains invalid characters, I block the action.

I certainly can achieve this with those delegate methods but I need to know is there any in-house methods in the framework to achieve this ?

1

There are 1 best solutions below

0
C4se On

I found out that we have to override the following method in our FormViewController subclass

func textInput<T>(_ textInput: UITextInput, shouldChangeCharactersInRange range: NSRange, replacementString string: String, cell: Cell<T>) -> Bool