GuOrg / Gu.Wpf.NumericInput

MIT License
74 stars 20 forks source link

CanValueBeNull with RegexPattern not working(?) #66

Open XavrasX opened 3 years ago

XavrasX commented 3 years ago

Hi. I've tried to bind decimal? to DecimalBox, but with any RegexPattern there is validation error. While there's no pattern removig value from decimalbox don't causes errors. I tried different patterns and didn't find solution. My example:

 xmlns:numeric="http://gu.se/NumericInput"

 <numeric:DecimalBox
        NumberStyles="AllowDecimalPoint"
       CanValueBeNull="True"
       RegexPattern="(^$)|(^\d{4})"
 />