Prevent initial bind of null to Validation Messages

asked 2015-02-13 13:47:02 +0800

JustinFrost gravatar image JustinFrost
139 1 6

I have setup my form with a middle object and have inline validation on my fields. This is working fields are validated onBlur and all fields are validated when the save button is clicked (Command doSave).

The problem is I am styling the field for a successful validation based on the ValidationMessages. This is working fine except on the initial bind of validation messages (null) the fields are are highlighted as successful validation, I do not want this to happen. Can I prevent this somehow, I have tried setting the messages to an empty array in my validator, but it ends up as null in my component...


<div form="@id('formData') @load(vm.customerDetail) @save(vm.customerDetail, before='doSave')">

Each of my fields is setup validate immediately:

<textbox id="customerName" value="@bind(formData.name) @validator(vm.fieldValidator)" inlineErrors="@bind(vmsgs.texts[customerName])"/>
delete flag offensive retag edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-02-13 13:47:02 +0800

Seen: 9 times

Last updated: Feb 13 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More