Allow Multiple Emails in Custom Fuel Module Email Field

edited March 2013 in Feature Requests
How do you override the default Fuel behavior that validates a field in a custom module containing the word "email" in order to allow multiple emails separated by commas? I have code that pulls in this email field to send an email to that recipient and my client is asking if we can specify multiple emails in the single email field, but Fuel's validation is preventing me from adding additional ones.

Anyway to override this behavior?

Erik

Comments

  • edited 6:07PM
    There is an auto_validate property on MY_Model (which your models inherit from). This has a default value of:
    public $auto_validate_fields = array( 'email|email_address' => 'valid_email', 'phone|phone_number' => 'valid_phone' );
    That basically means any field that has the word "email" or "email_address" will have the valid_email function tested against it during validation. If you blank out that value to an empty array you should be alright.
Sign In or Register to comment.