Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Numeric Validation -Fails Integer [2.5 BETA TESTS] 21 Jun 2013 16:55 #7593

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
Searched for this one but could only find posts from 6 -7 months ago (sorry if it is already a known issue in 2.5 beta)

Today I created an integer field and set the properties as follows
- required -> yes
- unique -> no
- default value -> 365
- prefills form -> yes

validator -> numeric (set by default when field created)

in the validation test box any integer such as 2011, 365, 35465... fails validation

also fails in downloaded component

Please Log in or Create an account to join the conversation.

Numeric Validation -Fails Integer [2.5 BETA TESTS] 21 Jun 2013 18:19 #7596

  • BTB300
  • BTB300's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Posts: 415
  • Thank you received: 132
After some trouble shooting - rule names miss matched perhaps?

an integer value lets say 2...

Fails
numeric
positive integer

passes
decimal
positive decimal
percentage

A decimal value lets say 2.0 or 2.00

passes
percentage rule only

fails
All other predefined number validation rules

Hope the above information helps to find the resolution

Please Log in or Create an account to join the conversation.

Last edit: by BTB300.

Numeric Validation -Fails Integer [2.5 BETA TESTS] 23 Jun 2013 21:43 #7619

Hi,
I had the same experience, the numeric regex has an unexpected behaviour (in my opinion).
I thought it should allow any integer positive or negative, but I was wrong. it works only with a numeric range between -9 and 9.
I think this should be changed, also because this validation is used on the ordering field, so when the list becomes higher then 1 digit (for example: 10), the validation give a false error in the form.

I fixed it, using this regex pattern: ^-{0,1}\d+$
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.059 seconds

I must say that I'm leaps and bounds ahead of where I would have other been with J2.5 with full thanks to the folks on this forum and specifically to Cook so you'll never hear me complaining.
gdpodesta (Forum)  

Get Started