hi there,
i have a piece of Java code which work well, but i need it to accept numbers only. here it is:
window.addEvent('domready', function() {
var name = new LiveValidation('text_14');
name.add( Validate.Length, {
minimum: 10,
maximum: 15,
wrongLengthMessage: 'Phone Number Must be between 10 & 15 characters'
});
});
would you please help me make proper changes?
thanks
i have a piece of Java code which work well, but i need it to accept numbers only. here it is:
window.addEvent('domready', function() {
var name = new LiveValidation('text_14');
name.add( Validate.Length, {
minimum: 10,
maximum: 15,
wrongLengthMessage: 'Phone Number Must be between 10 & 15 characters'
});
});
would you please help me make proper changes?
thanks
Hi maxfard,
This is a snippet of JavaScript that uses the LiveValidation JavaScript library - it will not run without the library.
As it happens ChronoForms validation uses the same library and you can use the validate-number option to check for a number.
If you want a full custom validation then see the LiveValidation documents for the extra validations to add to check for digits (from memory it is Validate.Number).
Bob
This is a snippet of JavaScript that uses the LiveValidation JavaScript library - it will not run without the library.
As it happens ChronoForms validation uses the same library and you can use the validate-number option to check for a number.
If you want a full custom validation then see the LiveValidation documents for the extra validations to add to check for digits (from memory it is Validate.Number).
Bob
thank you, that answered my question as well :-)
This topic is locked and no more replies can be posted.
