Skip to content

Version 0.1.3 #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
wsjcpp-validators
tmp/*
.vscode

# Vim temp files
*.swp
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# wsjcpp-validators Changelog

## [v0.1.3]

- Updated years in license
- Added license comment to source files
- Apply clang format for source code
- Removed requitements nlohmann::json (Author of nlohmann::json deny support wsjcpp subsystems)
- Updated wsjcpp-core to v0.2.3
- Fix #9 Add class for validate domain name
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ find_package(Threads REQUIRED)

include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-validators_SOURCE_DIR})

# Sources
Expand Down
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@

[![Build Status](https://api.travis-ci.com/wsjcpp/wsjcpp-validators.svg?branch=master)](https://travis-ci.com/wsjcpp/wsjcpp-validators) [![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-validators.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-validators/stargazers) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-validators.svg)](https://github.com/wsjcpp/wsjcpp-validators/) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-validators.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-validators/network/members)

## Integrate to your project

Just include this files:

- src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp
- src.wsjcpp/wsjcpp_core/wsjcpp_core.h
- src/wsjcpp_validators.h
- src/wsjcpp_validators.cpp

## Integrate via wsjcpp

```
$ wsjcpp install "https://github.com/wsjcpp/wsjcpp-core:v0.2.3"
$ wsjcpp install "https://github.com/wsjcpp/wsjcpp-validators:master"
```

## Example usage

``` cpp

WsjcppValidatorUUID *pValidatorUUID = new WsjcppValidatorUUID();
std::string sError = "";
if (!pValidatorUUID->isValid("abcdef01-ABCD-EF23-1000-000000000001", sError)) {
std::cout << sError << std::endl;
}
```

Classes for data validation

## Completed classes
Expand Down Expand Up @@ -31,31 +58,6 @@ Classes for data validation
- `WsjcppValidators::isValidIPv4(const std::string &sValue, std::string &sError)`
- `WsjcppValidators::isValidIPv6(const std::string &sValue, std::string &sError)`

## Integrate to your project

Just include this files:

- src.wsjcpp/nlohmann_json/json.hpp
- src/wsjcpp_validators.h
- src/wsjcpp_validators.cpp

## Integrate via wsjcpp

```
$ wsjcpp install https://github.com/wsjcpp/wsjcpp-validators:master
```

## Example usage

``` cpp

WsjcppValidatorUUID *pValidatorUUID = new WsjcppValidatorUUID();
std::string sError = "";
if (!pValidatorUUID->isValid("abcdef01-ABCD-EF23-1000-000000000001", sError)) {
std::cout << sError << std::endl;
}
```

## Example for your implementations

``` cpp
Expand Down
4 changes: 4 additions & 0 deletions run_clang_format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

clang-format -style=file -i src/wsjcpp_validators.h
clang-format -style=file -i src/wsjcpp_validators.cpp
1 change: 0 additions & 1 deletion src.wsjcpp/.gitkeep

This file was deleted.

20 changes: 7 additions & 13 deletions src.wsjcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Automaticly generated by wsjcpp@v0.1.5
# Automaticly generated by wsjcpp@v0.2.5
cmake_minimum_required(VERSION 3.0)

add_definitions(-DWSJCPP_APP_VERSION="v0.1.2")
add_definitions(-DWSJCPP_APP_VERSION="v0.1.3")
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-validators")

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MACOSX TRUE)
endif()

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)

set (WSJCPP_LIBRARIES "")
set (WSJCPP_INCLUDE_DIRS "")
Expand All @@ -17,16 +17,10 @@ set (WSJCPP_SOURCES "")
find_package(Threads REQUIRED)
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})

# wsjcpp-core:v0.1.7
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/wsjcpp_core/")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.h")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.cpp")

# nlohmann/json:v3.9.1
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/nlohmann_json/")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/nlohmann_json/json.hpp")
# wsjcpp-core:v0.2.3
list (APPEND WSJCPP_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/")
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")

# required-libraries
list (APPEND WSJCPP_LIBRARIES "-lpthread")
Expand Down
Loading