Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Unexpected "0" symbol in Mask "{number:1-2}"
posted

Hello.

When I use a mask "{}{number:1-2}.##" in XamMaskedEditor, I expect first symbol can be "1" or "2". But I can input "0" as first symbol.

How can I exclude "0" as first symbol?

Parents
No Data
Reply
  • 29105
    Offline posted

    Hello Alexey,

    Thank you for contacting Infragistics. You may use a regular expression to exclude zeros from being inputted on the editor.

    eg.


    <igEditors:XamMaskEditor.ValueConstraint> 
        <igEditors:ValueConstraint  RegexPattern="^-?(0\.\d*[1-9]\d*|[1-9]\d*(\.\d+)?)$"/> 
    </igEditors:XamMaskEditor.ValueConstraint>


    Let me know if you have any questions.

Children