Results 1 to 5 of 5

Thread: Non-Required field still throws a validation error.

  1. #1
    RedPoint is offline Member
    Join Date
    Jun 2010
    Posts
    14

    Default Non-Required field still throws a validation error.

    Version: CE 5.5
    Module: Custom
    Issue: I have defined a series of date fields in the vardefs, and editviewdefs that are not required, but when the user attempts to create a new record, or modify an old one all date fields in this module throw an error "Invalid Value for: [label]"

    Sample Vardefs:
    PHP Code:
    'date_artwork_deadline' => array (
        
    'name' => 'date_artwork_deadline',
        
    'vname' => 'LBL_DATE_ARTWORK',
        
    'type' => 'date',
        
    'required'=>false,
        
    'comment'=>'Custom date field.',
      ), 
    Sample EditviewDefs:
    PHP Code:
    array('name'=>'date_artwork_deadline'), 
    The database permits null, but I've also attempted to fill the field with a default value.
    I have tried adding required => false to the edit view defs.

    Any help or guidance would be much appreciated.
    Last edited by RedPoint; 2011-03-02 at 03:21 PM. Reason: Added extra styling.

  2. #2
    RedPoint is offline Member
    Join Date
    Jun 2010
    Posts
    14

    Default Re: Non-Required field still throws a validation error.

    This person appears to have the same issue, but there is no solution:
    http://www.sugarcrm.com/forums/showthread.php?t=62358

  3. #3
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Non-Required field still throws a validation error.

    Quote Originally Posted by RedPoint View Post
    Version: CE 5.5
    Module: Custom
    Issue: I have defined a series of date fields in the vardefs, and editviewdefs that are not required, but when the user attempts to create a new record, or modify an old one all date fields in this module throw an error "Invalid Value for: [label]"

    Sample Vardefs:
    PHP Code:
    'date_artwork_deadline' => array (
        
    'name' => 'date_artwork_deadline',
        
    'vname' => 'LBL_DATE_ARTWORK',
        
    'type' => 'date',
        
    'required'=>false,
        
    'comment'=>'Custom date field.',
      ), 
    Sample EditviewDefs:
    PHP Code:
    array('name'=>'date_artwork_deadline'), 
    The database permits null, but I've also attempted to fill the field with a default value.
    I have tried adding required => false to the edit view defs.

    Any help or guidance would be much appreciated.
    Are you able to reproduce this same issue in a fresh install, with demo data, same version you faced this issue?

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  4. #4
    RedPoint is offline Member
    Join Date
    Jun 2010
    Posts
    14

    Default Re: Non-Required field still throws a validation error.

    I haven't tested that but I'd end up introducing the same custom code into the system anyway so if it's my programming that's caused the problem I would need to debug this issue anyway.

    I have used the same sort of fields (same vardefs, same logic hooks) in other custom modules and not encountered an error like this.
    Attached Images Attached Images  
    Last edited by RedPoint; 2011-03-02 at 07:44 PM.

  5. #5
    RedPoint is offline Member
    Join Date
    Jun 2010
    Posts
    14

    Default Re: Non-Required field still throws a validation error.

    This is still a major issue with my application. Is there anyone out there who can provide further guidance?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Deleting a contacts throws a sql error
    By krishsugar in forum Developer Help
    Replies: 1
    Last Post: 2010-08-11, 05:04 AM
  2. Remove Required Field after Validation
    By ardn0001 in forum Developer Help
    Replies: 4
    Last Post: 2010-06-21, 10:35 PM
  3. Bug in parent field validation when set to required?
    By michel.d in forum Developer Help
    Replies: 1
    Last Post: 2010-01-11, 11:45 AM
  4. Reply to private message throws 403 error
    By kuske in forum Site feedback
    Replies: 13
    Last Post: 2008-06-17, 11:02 PM
  5. Replies: 2
    Last Post: 2008-05-16, 09:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •