|  Login
September 09, 2010  
Blog
Minimize
You must be logged in and have permission to create or edit a blog.
  
 
Search
 
My solution to the page_validators is undefined error
Minimize
Location: BlogsLiving in Software Development    
Posted by: host 2/2/2010 12:38 AM
Off and on over the years I have been haunted by the error "page_validators is undefined". Today it was coupled with "Unterminated string constant". I figured out why it was happening to me. I dynamically add validators to a page where i dynamically add textboxes to be filled in by users. In my code i determine the IDs of those validators by the names of configured fields. I noticed an embedded CRLF in one of my configured field names which was causing the generated validation script to also have a CRLF. In the script, I saw the closing quotation mark on the next line which was where the "Undetermined String Constant" error was coming from. Page_Validators is undefined just bubbled from that. So the moral of this story is make sure you don't have any hidden characters that are messing with your validation!
Permalink |  Trackback

Your name:
Title:
Comment:
Add Comment   Cancel 
Blog
Minimize