phone validation javascript

This commit is contained in:
JT Smith 2006-07-25 13:36:55 +00:00
parent 03e602363b
commit de35e950bf
2 changed files with 2 additions and 1 deletions

View file

@ -42,6 +42,7 @@
characters. (Thanks to Zhou Xiaopeng)
- fix: Splat_random Macro not so random (Wouter van Oijen / ProcoliX) (Thanks
to Colin Kuskie for pointing this out and writing some tests)
- rfe: phone validation javascript
7.0.2

View file

@ -96,7 +96,7 @@ Renders a phone number field.
sub toHtml {
my $self = shift;
$self->session->style->setScript($self->session->url->extras('inputCheck.js'),{ type=>'text/javascript' });
$self->set("extras", $self->get('extras') . ' onkeyup="doInputCheck(document.getElementById(\''.$self->get("id").'\'),\'x0123456789-()+ \')" ');
$self->set("extras", $self->get('extras') . ' onkeyup="doInputCheck(document.getElementById(\''.$self->get("id").'\'),\'x.0123456789-()+ \')" ');
return $self->SUPER::toHtml;
}