27
Views
2
Comments
how to validate decimal points length
Question
Application Type
Reactive

Hello All,

I'm working on Reactive Web App, I need to allow user to enter 12 decimal points (1764. (12 digits))

for this i'm using Text Attribute. how to validate this text attribute to have only 12 digits after point(.)
if user enters more than 12 decimal points i need to show error message.

I tried index and length but no luck.
Can someone help me here.

Regards.

Hello @Leo thomas 

Have you tried regex search?

You can pass that decimal value to the regex action and use the pattern:

^\d+(\.\d{1,12})?$

regex action you can get in 

If regex is found you can give the error message.

Thanks 

Anees

Hello,

I'd also say to try the Index function since it works fine with text... weird... it's not detecting the dot "." at all?

Other solution (which is worse in my opinion) is to use String_Split (Text extension if server side). If you need in client side, check the Forge for a component to do this.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.