Restrict user to enter only two decimal poins

Hi,

I need to restrict user to enter only 2 decimals (For ex; User should not be able to enter after 2.12).

If user tried to enter 3rd decimal point need to display error message like “Allow only two decimal points”.

Does any one have edit validate rule for above requirement ?

.

Hi @Gayan_Wijesiri: Few ways to achieve this.

  1. You can use property qualifier “pyDecimalPrecision” to automatically round off the decimal
  2. You can use edit input to format the text (no OOTB available. Need to create for specific need)
  3. You can use edit validate to validate the input (no OOTB available. Need to create for specific need)

Some ref as below:

Thanks.

@ArulDevan Do you have any Edit input or edit validate Code?. I want to display the error massage

Hi @Gayan_Wijesiri: Please find edit validate code for your scenario. Similar examples given in above shared articles.

Thanks.

@ArulDevan Thanks. Above code is working fine.