@@ -22,9 +22,9 @@ $ wsjcpp install "https://github.com/wsjcpp/wsjcpp-validators:master"
2222
2323``` cpp
2424
25- WsjcppValidatorUUID *pValidatorUUID = new WsjcppValidatorUUID ();
25+ validator_uuid *pValidatorUUID = new validator_uuid ();
2626std::string sError = " " ;
27- if (!pValidatorUUID->isValid ("abcdef01-ABCD-EF23-1000-000000000001", sError)) {
27+ if (!pValidatorUUID->is_valid ("abcdef01-ABCD-EF23-1000-000000000001", sError)) {
2828 std::cout << sError << std::endl;
2929}
3030```
@@ -36,39 +36,39 @@ Classes for data validation
3636- `new WsjcppValidatorStringRegexpBase("testre", "^[a-zA-Z]+$")` - validate value by regular expression
3737- `new WsjcppValidatorStringListBase("lang", {"en", "de", "ru"})` - validate value from a list
3838- `new WsjcppValidatorEmail()` - validate format email
39- - `new WsjcppValidatorUUID ()` - validate format uuid
40- - `new WsjcppValidatorStringLength (1,100)` - validate min length and max length
41- - `new WsjcppValidatorJWT ()` - validate format of JWT
39+ - `new validator_uuid ()` - validate format uuid
40+ - `new validator_strlen (1,100)` - validate min length and max length
41+ - `new validator_jwt ()` - validate format of JWT
4242- `new WsjcppValidatorDate()` - validate format date like 'YYYY-MM-DD'
43- - `new WsjcppValidatorTimeH24 ()` - validate format date like 'HH:mm:ss' (24 hours)
43+ - `new validator_time24 ()` - validate format date like 'HH:mm:ss' (24 hours)
4444- `new WsjcppValidatorDateTime()` - validate format date like 'YYYY-MM-DD\THH:mm:ss'
4545- `new WsjcppValidatorURL()` - validate format of url
46- - `new WsjcppValidatorBase64 ()` - validate format of base64
46+ - `new validator_base64 ()` - validate format of base64
4747- `new WsjcppValidatorNumber()` - validate format of number
4848- `new WsjcppValidatorHex()` - validate hex value
4949- `new WsjcppValidatorIntegerMinValue(1)` - validate integer min value
5050- `new WsjcppValidatorIntegerMaxValue(100)` - validate integer max value
5151
5252## Completed static functions
5353
54- - `WsjcppValidators::isValidDate (const std::string &sValue, std::string &sError)`
55- - `WsjcppValidators::isValidTimeH24 (const std::string &sValue, std::string &sError)`
56- - `WsjcppValidators::isValidDomainName (const std::string &sValue, std::string &sError)`
57- - `WsjcppValidators::isValidBase64 (const std::string &sValue, std::string &sError)`
58- - `WsjcppValidators::isValidIPv4 (const std::string &sValue, std::string &sError)`
59- - `WsjcppValidators::isValidIPv6 (const std::string &sValue, std::string &sError)`
54+ - `WsjcppValidators::is_validDate (const std::string &sValue, std::string &sError)`
55+ - `WsjcppValidators::is_validTimeH24 (const std::string &sValue, std::string &sError)`
56+ - `WsjcppValidators::is_validDomainName (const std::string &sValue, std::string &sError)`
57+ - `WsjcppValidators::is_validBase64 (const std::string &sValue, std::string &sError)`
58+ - `WsjcppValidators::is_validIPv4 (const std::string &sValue, std::string &sError)`
59+ - `WsjcppValidators::is_validIPv6 (const std::string &sValue, std::string &sError)`
6060
6161## Example for your implementations
6262
6363``` cpp
64- class WsjcppValidatorUUID : public WsjcppValidatorStringRegexpBase {
64+ class validator_uuid : public WsjcppValidatorStringRegexpBase {
6565 public:
66- WsjcppValidatorUUID ()
66+ validator_uuid ()
6767 : WsjcppValidatorStringRegexpBase(
6868 "uuid", // name
6969 "^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$"
7070 ) {
71- TAG = "WsjcppValidatorUUID ";
71+ TAG = "validator_uuid ";
7272 }
7373};
7474```
0 commit comments