ISEMAIL and textarea

Discussion in 'Developers' Forum' started by dharman, Sep 9, 2016.

  1. dharman

    dharman ISPConfig Developer ISPConfig Developer

    There is an "ISPConfig way" to validate a textarea with multiple email addresses?
    Or maybe I can implement a brand new "AREEMAIL" item?
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Maybe you can extend ISEMAIL to parse a string, too? With an optional validator.
     
  3. dharman

    dharman ISPConfig Developer ISPConfig Developer

    Ok, I can extend ISEMAIL as well. But...what means "optional validator"? I think is easy to detect if there are multiple emails or only one within $field_value and choose automatically how to proceed.
    In my opinion, if the user specify more email addresses and one of them is wrong, then an error must be produced...
     
    Last edited: Sep 13, 2016
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess he meant to add an option which specifies if multiple email addresses are valid for this field or not and then act according to this setting. E.g. add an option "separator" which specifies how the email addresses have to be separated (e.g. , or ; or \n ) and if the separator option is set, split the string by this separator and then check that each splitted part is an email address.
     
  5. dharman

    dharman ISPConfig Developer ISPConfig Developer

    Ok, I'll do so.
     

Share This Page