Content


NTL
Core
CDbValidatorEmail

CDbValidatorEmail


Email validator checks whether an attribute value corresponds to specified E-mail pattern.

You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.

class CDbValidatorEmail :public CDbValidator
{
public:
    // IDbValidator methods 
    bool Validate(CDbModel *model, IDbAttribute *attribute, String &error) override;

    CDbValidatorEmail();

    CDbValidatorEmail *setPattern(const String &value); // Set email pattern (regular expression) 
    CDbValidatorEmail *setFullPattern(const String &value); // Set email full pattern (regular expression) 
    CDbValidatorEmail *setAllowName(const bool &value); // Set whether name is allowed in email. If true, full pattern is used, otherwise pattern is used 

    static ReleasablePtr<CDbValidatorEmail> Create(); // Helper static method to create validator in form used in model rule adding methods 
};
Namespace: nitisa
Include: Nitisa/Db/DbValidatorEmail.h