šŸ†• Text entry min/max characters!

Very nice but I have a doubt.
Setting Min and Max the field becomes mandatory and this in my opinion is not perfectly right.
I think that the Min Max Length condition should be activated only when the field is also marked as Required; in this way the user can leave the field empty or correctly filled in.
For example if the Input field is ā€œPostal Codeā€, you can leave it blank if you do not provide your address, but if you fill it in you must enter all the required characters for it to be valid.
Will there be the possibility of applying a RegExp in the future?

4 Likes

Yes! RegEx is the way! Will TRANSFORM data entry.

And I totally agree with your logic too.

1 Like

Hello @Roldy!

Unfortunately, what you suggest would not work for many of us, and there are many use cases that would be negated. To require the field in order to use the character limiterā€¦If we want users to set up a profile, and one field is the userā€™s Bio, we donā€™t want to mark required since they can also do this later, but we do want to limit the text if they choose to enter it. Same thing with posting an itemā€¦we have a required title, but optional description field, but need limit it to few linesā€¦and so on and so on.

I just wanted to share additional point of view. Thanks!

3 Likes

Yup. RegEx is the answer ā€¦

3 Likes

Hi Deena! Thanks for your point of view.
With the assumption that I made, your scenarios would not work, I agree; in mine, however, Min and Max become practically useless. The goal would be to implement controls that satisfy most possible management scenarios. I am sure these Glide geniuses will find a right solution in the future. As I suggested, in my opinion, the right way would be to (optionally) enable a check based on regular expressions.

1 Like

Weā€™ll fix that. The way it should work is that if a minimum length is set, but the field is not required, then itā€™s ok if itā€™s empty, but if itā€™s not empty then the minimum length applies.

5 Likes

Can you please consider a very other common scenario that I mentioned in this thread. A lot of us to build community apps, will want to have min/max on fields that are not required. Very common use cases are, that we want the user to add their bio to their profile, and we do not want it to exceed say 100 characters, but we cannot make that field required because everyone will not sign up if they have to do that. Same thing with posting content. We want to make the title required, but the description should not be required. But if they do choose to enter it, then we need to limit the characters. I feel strongly that solving this problem by making a field required is creating another equally big problem for many of us. Can you use an extra tech box to solve the problem instead?I cannot stress enough how much of a problem this will be in community apps, social media apps, and many other applications.

2 Likes

You donā€™t have to make it required. If you limit the field to 100 characters, then itā€™s limited.

5 Likes

Ah, great, thank you. As long as we can set the limits and not require the field. I was a little confused by the thread so thank you for clarifying! :innocent:

2 Likes