Representatives and automatically detecting keywords

edited January 2014 in Modules
Hi all,

I have a field in my database called email_key and when I create a simple module, it tries to validate it as an email. I know of representatives and turning them off, but what about turning off the validation part? How do I do that? I need fuel to treat email_key as a regular text field--ultimately, I would want it to make sure it has 32 characters only--but I can figure that out myself.

Thanks in advance guys.
Ron

Comments

  • edited 5:13AM
    Found out that the auto_validate_fields is causing the problem. Instead of removing email from the list, what's the best way to turn it off at the model level?
  • edited 5:13AM
    Solved.
  • edited 5:13AM
    For reference, there is a $auto_validate_fields property on a MY_Model which is set by default:
    public $auto_validate_fields = array( 'email|email_address' => 'valid_email', 'phone|phone_number' => 'valid_phone' );
    This basically says any field that has "email" or "email_address" in it will automatically try and validate it. Overwriting this value should make that problem go away:
    public $auto_validate_fields = array( 'phone|phone_number' => 'valid_phone' );
Sign In or Register to comment.