This is probably an easy one, but I noticed that if I have a masked editor control that doesn't contain any data, the validation error is displayed. I changed the ValidationMode to LostFocus and that gets rid of it, but if I enter the field and exit it without entering anything (leaving it blank) I get the validation error again. Is there a way to not show the validation message unless something incorrect has actually been entered?
Do you have a mask set on your xamMaskedEditor? You should be able to set the mask so that it is not required to enter any value.
You didn’t’ mention what type of values you are expecting but if it a numeric, “9” is a placeholder for values 0-9 but entry is not required. If you are working with alpha characters only, l think “?” allows any letter but a character entry is not required. Alphanumeric placeholder would be “a”, no requiring value to be entered.
This may be of some help to you.
Sorry, I should have been more specific. What I'm trying to do is provide a mask that forces the user to enter four numbers ("####" like a year) but I don't want them to have to enter anything so leaving it blank should be okay, as well.
I think 9 is what you want. It requires a digit if a value is entered but it doesn’t require anything to be entered.
You can further restrict the value by adding value constraints to limit any number entered to a range of appropriate year values.
<igEditors:ValueConstraint MinExclusive="1990" MaxExclusive="2999" />
This is a link to our document on Masks. It may be helpful to you.
Let me know if I you have further questions.
Thanks, Marianne. That ValueConstraint is exactly what I needed.
I am also facing the same issue. How did u resolve it?