I have xamtexteditor. I want to validate the text for floating point values. I have oracle as backend. So my validation should be like integer part should be 16 digit and decimal part should be 7 digits.(in oracle column is 23,7). How i should validate both integer and fractional part. I am using xamtextbox for style also in the grid. I am not using xamnumericeditor .
Hello,
The XamEditors use the ValueConstraint class to validate the data that is entered. The ValueConstraint implements Regex validation which will look something like this:
<igEditor:XamTextEditor.ValueConstraint>
<igEditor:ValueConstraint RegexPattern="\d{16}\.\d{7}" />
</igEditor:XamTextEditor.ValueConstraint>
This Regex sets exactly 16 digits and 7 decimal part digits and nothing else. I suggest using this one its a bit more complicated: RegexPattern="\d{1,16}(\.\d{1,7})?" it prevents from enterring morethan the above mentioned digits and also its deciaml part is optional.
Hope this helps.
Sincerely,
Petar Monov,
DS Engineer,
Infragistics Bulgaria