Search code examples
regexpowerapps

Dutch Number & 2 Decimal Place Validation Power APP


A UK number looks like this 233.25 .

For a Dutch Number, it looks like this in the Power APP 233,25.

This works for the Power App in the UK but not in Holland, due to the comma for the decimal separator. How can I change this to get it to work? I have tried an OR statement but it does not work . ( ( TextInput.Text,"\d+(.\d{0,2})?") ) - REGEX

If(IsMatch( TextInput.Text,"\d+(.\d{0,2})?"), //justify whether meet the format Submit(Form1), //submit the form if the result is true Nodify("wrong format",NotificationType.Warning)) //display Notification if the result is false


Solution

  • You could try to format it yourself. Regardless of what the user inputs.

    Left(Value(TextInput.Text),Len(Value(TextInput.Text))-2) & "," & Right(Value(TextInput.Text),2) & "."
    

    enter image description here