Text entry needs validation

Hi

I have the phone number with 10 digits without country code.this I created a number entry field.I created a notification error if no entry from action.but how do I gets the error if I enter less than 10 and greater than 10.only 10 digit number to be allowed to enter.

You can use a number entry component and set the minimum and maximum number to fit the range to valid numbers.

image

4 Likes

Not sure how it works in other countries, but in mine numbers always start with 0. Mine is 0933-XXX-XXX :sweat_smile:

3 Likes

That could complicate it. You could always use a custom form and some sort of verification or an EX column with regex to check for valid formats, but yeah, I suppose each country is different.

1 Like

These validations are quite complex. The other day I tried an email validation and it’s much much more complicated than I anticipated it to be.

1 Like

Yeah, it can get ugly. It’s a lot of work to protect users from themselves. :wink:

2 Likes

Hi

It working if I gives below 9 digit or above 10 digit.but the validation error showing is not great.it looks ugly.its showing minimum value is 1000000000 and maximum value is 9999999999.

How to overcome this.

What’s the verbiage you want to use there?

1 Like

I didn’t know what this question is?

you can use a experimental column with excel formula to check length of the string… or if you dont mind waiting 5-10 seconds… use GS formula

We have the same issue with Zip Codes…can’t do 10000 to 99999 because Rhode Island has Zip Codes starting with 0.

We really just need RegEx already.

4 Likes

get value as a text and check for numeric characters

I mean what do you want to show in that “error” part instead of what Glide gives you.

We do have it! Indirectly… :wink:

2 Likes

I have already done a YC with Regex, if it needs to be modified or completed, let me know.

1 Like

For info, here are the possible zips codes in the US.

http://i18napis.appspot.com/address/data/US

Ya…but I would want it natively in a form…where it greys out the submit button.

4 Likes

"Invalid phone number " if it no value or lesser than 10 and greater than 10 digits

Here you go.

<pre><span><style>

[data-test="app-text-field"] +caption {
display: none;
}

[data-test="app-text-field"]::after{
content: "Invalid phone number";
color: rgb(255,118,116);
margin-top: 8px;
text-align: start;
font-weight: 400;
font-size: 0.75rem;
line-height: 1.0625rem;
font-family: -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

Condition for rich text is as you described: if phone is empty or phone is less than 1000000000 or phone is greater than 9999999999.

1 Like

Vera level - we called it next level in tamil language.thank you.

1 Like