In the config file, I set a feild to be 3 numerical digits long. When I go to submitt a record to test it out, I realized the script is taking any three characters, no matter if its alpha or numerical. How would I get it so the script to validate a feild for 3 numerical digits and produce an error if anything else (alpha) is typed in? Tanks for any help..
Change the maxlength column to 3 as well, not only the minimum column to 3. Set both columns in the fields to be 3.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Feb 12, 2000, 12:53 PM
New User (4 posts)
Feb 12, 2000, 12:53 PM
Post #3 of 7
Views: 2685
Yes, I understand. In the config file, the feild I am trying to get to validate for 3 numerical numbers looks like this:
Course_One => [3, 'numer', 3, 3, 1, '', ''],
But still, the form allows me to enter anything, alpha or numbers, less than 3 characters, it is accepting any input. How can I change it to accept only 3 numerical digits?
Course_One => [3, 'numer', 3, 3, 1, '', ''],
But still, the form allows me to enter anything, alpha or numbers, less than 3 characters, it is accepting any input. How can I change it to accept only 3 numerical digits?
Well, it shouldn't. Check the HTML codes in the sub html_record_form.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Not really...auto generation should read the maxlength column when building forms...but try turning off auto generation and then create your own forms in the sub html_record_form, and see if the problem persists.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
* Be sure to visit the Resource Center for FAQ's, Modifications and Extra Goodies!!
* Search Forums!
* Say NO to Duplicate Threads. :)
----------------------
Feb 22, 2000, 8:24 PM
Veteran / Moderator (3034 posts)
Feb 22, 2000, 8:24 PM
Post #7 of 7
Views: 2704
I believe what zns is looking for is something to add as a valid expression which would only accept numeric characters.
I'm not a programmer so don't have the answer but it must be similiar to how you would define:
email format: .+\@.+\..+
date format: DatePosted => [1,'date',12,15,1,&get_date, \d{2}\/\d{3}\/\d{4}''],
Hope this will at least help you to search for a solution by knowing you can do this in the .cfg field definition using a valid expression.
Or would it simply work by defining the field as numeric?
I'm not a programmer so don't have the answer but it must be similiar to how you would define:
email format: .+\@.+\..+
date format: DatePosted => [1,'date',12,15,1,&get_date, \d{2}\/\d{3}\/\d{4}''],
Hope this will at least help you to search for a solution by knowing you can do this in the .cfg field definition using a valid expression.
Or would it simply work by defining the field as numeric?