I have a field in the tutorial, CDS-CD_ID with the following parameters in Properties:
Field Type: Integer
Validator: Max Digits 10
Max Length 17
Is there a conflict here?
Which one takes precedence?
Integer Validator, Max Digits v. Max Length
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 44
- Joined: Sun Sep 15, 2013 6:26 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
The two validators work slightly differently:
Max length: sets the length of the input field and restricts the number of characters you can enter.
Max Digits: checks the input when you submit the form and issues a message
So with these settings you could type up to 17 characters but only inputs up to 10 digits will be posted.
Max length: sets the length of the input field and restricts the number of characters you can enter.
Max Digits: checks the input when you submit the form and issues a message
So with these settings you could type up to 17 characters but only inputs up to 10 digits will be posted.
0 x
-
- Ebase User
- Posts: 44
- Joined: Sun Sep 15, 2013 6:26 pm
max length, max digits
Example 1
Max Length=3
Max Digits=5
You are allowed to enter 12345
What will be shown is 12345
What will be posted to db 123
Example 2:
Max Length=5
Max Digits=3
You are allowed to enter 123
What will be shown is 123
What will be posted to db 123
Max Length=3
Max Digits=5
You are allowed to enter 12345
What will be shown is 12345
What will be posted to db 123
Example 2:
Max Length=5
Max Digits=3
You are allowed to enter 123
What will be shown is 123
What will be posted to db 123
0 x
New Potential User.
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Well that's a surprise and not what I was expecting. Example 2 sounds OK but example 1 doesn't. If I try this on my system, I can only enter 3 characters - but my starting point is an empty input box. If you start off with a value which is longer than max length e.g. you've loaded it from a database, the browser will display it, but then it won't let you submit it. I think that might be what you're seeing. Also if you remove the characters in the browser, you will then only be able to enter 3 characters (max length).
0 x
Who is online
Users browsing this forum: No registered users and 1 guest