|
|
@ -41,18 +41,14 @@ has_field 'routing_number' => (
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
has_field 'type' => (
|
|
|
|
has_field 'type' => (
|
|
|
|
type => 'Select',
|
|
|
|
type => 'Text',
|
|
|
|
required => 0,
|
|
|
|
required => 0,
|
|
|
|
label => 'Type',
|
|
|
|
maxlength => 31,
|
|
|
|
options => [
|
|
|
|
|
|
|
|
{ label => '', value => '' },
|
|
|
|
|
|
|
|
{ label => 'fixed', value => 'fixed' },
|
|
|
|
|
|
|
|
{ label => 'mobile', value => 'mobile' },
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
element_attr => {
|
|
|
|
element_attr => {
|
|
|
|
rel => ['tooltip'],
|
|
|
|
rel => ['tooltip'],
|
|
|
|
title => ['The optional LNP number type tag, for CDR exports.']
|
|
|
|
title => ['The optional LNP number type tag, for CDR exports.']
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
validate_method => \&_validate_type,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
has_field 'start' => (
|
|
|
|
has_field 'start' => (
|
|
|
@ -101,5 +97,14 @@ sub validate_number {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub _validate_type {
|
|
|
|
|
|
|
|
my ( $self, $field ) = @_;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($field->input =~ /[^a-z0-9_-]/i) {
|
|
|
|
|
|
|
|
$field->add_error($field->label . " must be alphanumeric");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
1;
|
|
|
|
1;
|
|
|
|
# vim: set tabstop=4 expandtab:
|
|
|
|
# vim: set tabstop=4 expandtab:
|
|
|
|