Currency Regex with MaskedEdit

Hi,

How can I have a currency regex with SfMaskedEdit with the following conditions:

  1. Must be greater than zero (including the decimal so it should not accept 0.00 but it can accept anything above 0.01
  2. Two decimal place (but can be (1234.00) so decimal must be shown but not must to enter
  3. Three digits current code prefix, e.g. USD 1234.00
  4. No maximum for the number so it can be 123456789.00 for example.
  5. No thousands separator.


Thanks,

Jassim



1 Reply 1 reply marked as answer

ET Eswaran Thirugnanasambandam Syncfusion Team November 1, 2021 01:01 PM UTC

Hi Jassim, 
 
Greetings from Syncfusion. 
 
You can achieve this requirement by using Mask and MaskType properties of SfMaskedEdit. Please find the code snippet below. 
 
<syncmaskededit:SfMaskedEdit x:Name="maskedEdit"  
                                                          MaskType="RegEx"  
                                                          Mask="USD \d+.(0[1-9]|[1-9]\d)"  
                                                          /> 
  
We have prepared a sample for the same. Please get it from the below link. 
 
Please check the sample let us know if you have any further assistance.  
  
Regards,  
Eswaran. 


Marked as answer
Loader.
Up arrow icon