Hello,
after a lot of searching on the forum i got me a test form created with two field and a submit button.
in the form i activated the JS validation and set the Errors event to "onSubmit & onBlur".
On the field in put in the class => "validate[digit[0,300]], game" without the quotes. Also on the validation i checked the digit validation.
The game class is to test a CSS setting for the field width.
When i put alpha characters in the field then i receive an error message to indicate that there must be digits entered. This i receive when leaving the field. However when i enter a value like 500, when leaving the field then i don't get any error message.
Any help here?
after a lot of searching on the forum i got me a test form created with two field and a submit button.
in the form i activated the JS validation and set the Errors event to "onSubmit & onBlur".
On the field in put in the class => "validate[digit[0,300]], game" without the quotes. Also on the validation i checked the digit validation.
The game class is to test a CSS setting for the field width.
When i put alpha characters in the field then i receive an error message to indicate that there must be digits entered. This i receive when leaving the field. However when i enter a value like 500, when leaving the field then i don't get any error message.
Any help here?
Hi rodiusd,
What do you see in the Form HTML? I suspect that you now have two Class attributes, try un-checking the digit validation.
Bob
What do you see in the Form HTML? I suspect that you now have two Class attributes, try un-checking the digit validation.
Bob
Now nothing is working, onSubmit nor the onBlur. Include the HTML code of the form.
Question do we need the comma after the validate?
<div class="ccms_form_element cfdiv_select" id="input_select_11_container_div" style=""><label>Label Text</label><select size="1" class="" title="" name="input_select_1">
<option value="No">No</option>
<option value="Yes">Yes</option>
</select>
<div class="clear"></div><div id="error-message-input_select_1"></div></div><div class="ccms_form_element cfdiv_text" id="input_text_31_container_div" style=""><label>check range</label><input maxlength="3" size="3" class="validate[digit[0,300]], game" title="" type="text" value="0" name="input_text_3" />
<div class="clear"></div><div id="error-message-input_text_3"></div></div><div class="ccms_form_element cfdiv_submit" id="input_submit_21_container_div" style="text-align:left"><input name="input_submit_2" class="" value="Submit" type="submit" />
<div class="clear"></div><div id="error-message-input_submit_2"></div></div><div class="ccms_form_element cfdiv_empty" id="empty_container_div" style=""><div class="clear"></div><div id="error-message-empty"></div></div>
Question do we need the comma after the validate?
Hi rodiusd,
Just to experiment please make the Yes/No Select box required - that should force the validation code to be loaded. (Please see this FAQ for more about how the code is loaded.)
The comma isn't needed but it probably does no harm either.
Bob
Just to experiment please make the Yes/No Select box required - that should force the validation code to be loaded. (Please see this FAQ for more about how the code is loaded.)
The comma isn't needed but it probably does no harm either.
Bob
have changed the dropdown to be required. Nothing changed. Already visited the faq before this to check on how JS validation is working.
Hi rodiusd,
I got this to work using this class:
Bob
I got this to work using this class:
validate['digit[10,100]','required']
Bob
This topic is locked and no more replies can be posted.