You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am binding a text input to a model property. When the value changes, I want to save the changes to the server. I have this part done already. However, I need to run some validation on the new value before saving the model. Mostly I want to make sure that the text input isn't empty.
The general idea I'm working on is changing the title of the model in the view. I want to make sure that the new title isn't empty before saving the model back to the server. I have validation set on the server, but I would like to avoid wasting an ajax call to the server, since I already know empty values won't work.
How can I accomplish some simple validation like this when binding form elements to the model?
The text was updated successfully, but these errors were encountered:
I am binding a text input to a model property. When the value changes, I want to save the changes to the server. I have this part done already. However, I need to run some validation on the new value before saving the model. Mostly I want to make sure that the text input isn't empty.
The general idea I'm working on is changing the title of the model in the view. I want to make sure that the new title isn't empty before saving the model back to the server. I have validation set on the server, but I would like to avoid wasting an ajax call to the server, since I already know empty values won't work.
How can I accomplish some simple validation like this when binding form elements to the model?
The text was updated successfully, but these errors were encountered: