Content


NTL
Core
CDbValidatorUrl

CDbValidatorUrl


Url validator checks whether an attribute value is a URL.

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

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

    CDbValidatorUrl();

    CDbValidatorUrl *setPattern(const String &value); // Set pattern (regular expression) to compare against 
    CDbValidatorUrl *setDefaultScheme(const String &value); // Set scheme to be used in validation if it is not specified in attribute value 
    CDbValidatorUrl *setValidSchemes(const StringArray &value); // Set default valid schemes. By default "http" and "https" are only valid ones 

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