I hope you are all fine and enjoying good health.
Recently, I have learned VIP architecture and implemented it as well. What we actually do in interactor is the validation of networking calls like API for example and then we call presenter to check if it is valid.
I'm a bit confused about validating textfield inputs in the interactor. How can I validate textfields in interactor and the remaining process of the presenter.
for example: Not to accept more than 10 characters in a textfield. textfield should return numbers only etc.
It would be really appreciated if you help me out with this. All of the textfields validations in my project have been done in ViewController. I think it does not meet the VIP architecture requirements so therefore I would like to implement validations in interactor.
if self.emailTxt == "" {
self.showAlert(title: "Alert", message: "Please enter your email.", controller: self) {
//self.nameView.txt.becomeFirstResponder()
}
return