libs/web: implement new phone digit datatype, useful for VoIP related config screens
This commit is contained in:
parent
cd4e008cc1
commit
63a75c6ea9
2 changed files with 8 additions and 0 deletions
|
@ -269,6 +269,10 @@ var cbi_validators = {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
},
|
||||||
|
'phonedigit': function()
|
||||||
|
{
|
||||||
|
return (this.match(/^[0-9\*#]+$/) != null);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -305,3 +305,7 @@ function max(val, max)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ponedigit(val)
|
||||||
|
return (val:match("^[0-9\*#]+$") ~= nil)
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue