enable Save button based on data validation result

IzmailIzmail CZMember ✭✭

Hello,
I have a following problem, which I am not sure, how to solve. I am building app's setting, where user can specify list of accounts (left TableViewConstoller). As you can see on the screen, there is a Save button, which stores new account into the database.

Everything works, except for empty Name value, which cause an exception. I need to solve it in way, where Save button would be enabled only if data pass validation (Name is not empty).

I was thinking about some event, which would monitor Account.Name property and based on it's value, Save button would be enabled/disabled.

Problem is, that I have no idea, how to achieve that.

enter image description here

Thanks for any suggestions.

Sign In or Register to comment.