Commit d873bc92 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

feat(MailAttribute) Use email input type for MailAttribute

issue #5910
parent ccd3c4ca
......@@ -18,21 +18,6 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*! \brief This class allow to handle easily a String LDAP attribute that contains a mail address
*
*/
class MailAttribute extends StringAttribute
{
protected $trim = TRUE;
function validate ()
{
if (!tests::is_email($this->value)) {
return msgPool::invalid($this->getLabel(), $this->value);
}
}
}
/*! \brief This class allow to handle easily a String LDAP attribute that needs to be validated by a test from class tests
*
......@@ -50,6 +35,16 @@ class TestValidateAttribute extends StringAttribute
}
}
/*! \brief This class allow to handle easily a String LDAP attribute that contains a mail address
*
*/
class MailAttribute extends TestValidateAttribute
{
protected $trim = TRUE;
protected $testFunc = 'is_email';
protected $inputType = 'email';
}
/*! \brief This class allow to handle easily a String LDAP attribute that contains a host name
*
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment