Restrict tel nr length to 15
This commit is contained in:
@ -76,7 +76,7 @@ namespace Elwig.Helpers {
|
||||
public static ValidationResult CheckPhoneNumber(TextBox input, bool required) {
|
||||
string text = "";
|
||||
int pos = input.CaretIndex;
|
||||
for (int i = 0, v = 0; i < input.Text.Length && v < 30; i++) {
|
||||
for (int i = 0, v = 0; i < input.Text.Length && v < 15; i++) {
|
||||
char ch = input.Text[i];
|
||||
if (v == 0 && input.Text.Length - i >= 2 && ch == '0' && input.Text[i + 1] == '0') {
|
||||
v++; i++;
|
||||
|
Reference in New Issue
Block a user