I have a form with three fields. 1 or more of these fields needs to contain at least 1 number. (all three fields can only contain a number) At least one field needs to contain a number. At the moment you can enter Zero (0) but it must be at least the number 1. What type of jQuery validation can I do to validate these three fields for this type of rule?
jQueryJavaScript
Last Comment
Julian Hansen
8/22/2022 - Mon
Julian Hansen
Your requirements appear contradictory
1 or more of these fields needs to contain at least 1 number
all three fields can only contain a number
Are you saying that a field must contain at least one numeric character [0-9] or are you saying that all fields must contain only numbers?
Robert Granlund
ASKER
@Julian All fields can contain a number (character [0-9]) BUT at least one of the fields MUST contain a number (character [0-9])
Julian Hansen
Can they contain other characters in addition to a number?
Assuming it is only numbers then is it single digits only or can it be more than one digit?
I am assuming from what you said that the following is valid.
F1: (empty)
F2: 33
F3: (empty)
Is the above valid?
1 or more of these fields needs to contain at least 1 number
all three fields can only contain a number
Are you saying that a field must contain at least one numeric character [0-9] or are you saying that all fields must contain only numbers?