• Ed Holderman
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

My scenario is : I have a field of Number type and whose decimal point is set to 0.

 

If user enters any decimal data then it should show a validation message "Only numeric Values". But I can not achieve this. Can any one tell me how to use Reges to restrict user from entering any decimal no.

 

I am facing two problems. -

 

1. Can we have Regex on Numeric type field.

2. REGEX(NPS_Score__c ," ^[-+]?\\d+(\\.\\d+)?$"). i am using this expression to check if it contains and decimal then it will return true and error message will be flashed. I am getting "Incorrect Argument Type error".

 

Any help will be appreciated. Thank in advance.

 

With Regards,

Mayank Pant