Unwanted telephone field validation

edited April 2016 in Share
I've got a table that rarely needs updating, but it is listed as a module in the Fuel CMS. It has a couple of fields that have "telephone" in the column name. When I try to update them in the CMS, I get the validation error "Please enter in a valid phone number." I can't find where or why this is being triggered - I don't want any validation on these (or at least, they are UK numbers, with a different validation requirement - perhaps?). I thought there might be a representative of "telephone", but there doesn't appear to be, so ignoring any representative doesn't work. I'm not adding any validation myself either in the model. What is happening here?


  • edited April 2016
    Fuel has this (occasionally annoying but handy) feature of working out what the field contents are based on it's name. You can disable that for your field using: $fields['telephone']['ignore_representative'] = TRUE; does that help?

    EDIT: Hmm Sorry. I should have read your whole question. Looks like you tried this. Though it should work...
  • edited 3:11AM
    On the model, there is an "auto_validate_fields" property that by default is set to:
    public $auto_validate_fields = array( 'email|email_address' => 'valid_email', 'phone|phone_number' => 'valid_phone' );
    You can change it to:
    public $auto_validate_fields = array( 'email|email_address' => 'valid_email', );
  • edited 3:11AM
    Great - I didn't think to check there (duh).
    Thanks to you both!
Sign In or Register to comment.