Content


NTL
Core
CDbValidatorRange

CDbValidatorRange


Range validator checks whether an attribute value is one of the allowed ones.

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

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

    CDbValidatorRange();

    CDbValidatorRange *setStrict(const bool &value); // Set whether strict comparison (check type) is required 
    CDbValidatorRange *setNot(const bool &value); // Set whether to inverse comparison (NOT in range) 
    CDbValidatorRange *setRange(const std::vector<DbValue> &value); // Set list of allowed values 

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