Required validator checks whether an attribute value is not empty.
You can find more information in comments below. Overrided methods can be found in corresponding base class or interface.
class CDbValidatorRequired :public CDbValidator
{
public:
// IDbValidator methods
bool Validate(CDbModel *model, IDbAttribute *attribute, String &error) override;
CDbValidatorRequired();
CDbValidatorRequired *setStrict(const bool &value); // Set whether strict comparison (check type) is required. Used when RequiredValue is not Null
CDbValidatorRequired *setRequiredValue(const DbValue &value); // Set which value is expected to be in attribute. By default any not null value is Ok
CDbValidatorRequired *setMessageValue(const String &value); // Set error message indication validation failed
static ReleasablePtr<CDbValidatorRequired> Create(); // Helper static method to create validator in form used in model rule adding methods
};
Namespace: | nitisa |
Include: | Nitisa/Db/DbValidatorRequired.h |