How to add validation to TextBox

SachAccess

Active member
Local time
Tomorrow, 03:38
Joined
Nov 22, 2021
Messages
410
Hi,
I have few Forms in my DB. There are few TextBoxes in my DB.
User needs to give his input in these input box.

How do I add validation to these Textboxes. For example, one textbox requires user to input mobile number.
It has to be 10 digit, however at present Textbox takes any value, be it text, number or number of any length.

How can add validation here, I tried validation option in properties of textbox but was not able to understand it.
Can anyone please help me in this. Thanks.
 
Hi,
if you want validation for phone number textbox you can try input mask method of textbox.
 
Or put something like this in the validation property

len(myfield)=10 and isnumeric(myfield)
 
Thanks a lot for the help @CJ_London sir, have a nice day ahead. :)
PS - not aware of your time zone hence day. :)


PS - Sir it seems am doing something wrong with this. 'Like "??????????"' is working for me at present but somehow am doing mistake while entering your code, changed 'myfield' to textbox name but still same issues. Will revert with details. Thanks.
 
'Like "??????????"' is working for me at present

if that is working for you I would use that - it's simpler than my suggestion anyway....
 

Users who are viewing this thread

Back
Top Bottom