I put validation on name input field field you can see it when you click on addFields.I am having problem that validation message coming before click on Add Branch button because in addFields function i'm setting the value of name empty because if i don't do this click on edit and make changes and click add or cancel on it and after that click on addfields then it show the previous value in input fields. i want to show validation message on click of Add Branch and want input fields empty on click of addFields and with values on click of edit. How can i achieve these scenario together ?
here is link
`http://jsfiddle.net/sohimohit/43zkoszu/13/`
You can use showAllMessages(false)
on your error object
http://jsfiddle.net/43zkoszu/16/
All though I must say that your method of doing this is a little strange. Normaly with MVVM you have a seperate model for this and create a new one each time you want to registger a new