Custom Numeric Field Validation

#1

Hello,

Is there a way to validate numeric field that should contain only numbers with increments +15.
E.g. Requester is allowed to enter time he spent on task, but only (15, 30, 45, 60, 75, 90,…) minutes.

Thank you!
Marina

#2

Hi @marinam,

Yes, you can add a custom validation to the desired field and use the modulo operator:
Double.Parse(REQUEST_NUMBER.Text) %15 == 0
This means that the field is valid only if you divide the indicated number by 15 and the remainder is 0.

32%20PM

Regards,
Eddy.

#3

Thank you, @eddy.daouk. This helped a lot!

1 Like
#4

Glad to help @marinam!