I added a custom field (Company Name) and made the type STRING. When I go to add text into the field and submit I get [APPLICATION ERROR #1303 Invalid value for field].
Can someone please explain why I am entering an invalid field when I'm entering a text string?
thank you
Adding custom field displays "Invalid value for field&q
Moderators: Developer, Contributor
Same problem
I have the same problem, but only when i left the user defined field blank. In the definition the field id not required, but with Regular expression enabled, i can not leave the field blank.
The expression i use is: (A|B[0-9]{9})|([0-9]{10}). The expression catches the right values, but not the blank field!
Any help apreciated!
Many regards,
Christoph Neyen
The expression i use is: (A|B[0-9]{9})|([0-9]{10}). The expression catches the right values, but not the blank field!
Any help apreciated!
Many regards,
Christoph Neyen
Hi,thraxisp wrote:The value could be too short or too long, or not match the regular expression provided.
I have imposed a regular expression validation on a custom field and that works perfectly. Is there a way though to customize the "APPLICATION ERROR #1303 Invalid value for field" error message?
Often reporters don't have a clue which field is wrong. I would like to have a custom message but knowing which field is wrong would already be helpful.
Jee
Christoph:
I believe the problem you're experiencing is the fact that although the field is not required, your regular expression does not allow for an empty string.
I can see the argument for this going both ways but you could always bug it. For the time being, fix your regular expression to also allow an empty string.
Jee: to my knowledge, you cannot make the message any less generic without some code hacking.
Hope this helps,
Lincoln.
I believe the problem you're experiencing is the fact that although the field is not required, your regular expression does not allow for an empty string.
I can see the argument for this going both ways but you could always bug it. For the time being, fix your regular expression to also allow an empty string.
Jee: to my knowledge, you cannot make the message any less generic without some code hacking.
Hope this helps,
Lincoln.
-
- Posts: 5
- Joined: 09 Aug 2006, 22:53
Re: Same problem
At first, You have 2 errors in Your RE.Anonymous wrote:I have the same problem, but only when i left the user defined field blank. In the definition the field id not required, but with Regular expression enabled, i can not leave the field blank.
The expression i use is: (A|B[0-9]{9})|([0-9]{10}). The expression catches the right values, but not the blank field!
Any help apreciated!
Many regards,
Christoph Neyen
1. Technical
When we mean a 10-letter string, (A|B[0-9]{9}) match these strings:
"A"
"B#########"
but not "A#######"
2. Ideological
Your RE match any part of string, but not whole string.
So, (when we mean a 10-char str), Your RE allow "xyhgfAdmiw" string, looks totally wrong for You.
To solve both problems and allow empty string, try this RE:
Code: Select all
^([AaBb0-9][0-9]{9})?$