Skip to content

Commit

Permalink
Docs: add parameters to validator doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Dec 15, 2024
1 parent 9bdfa64 commit 8195bfd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions web/docs/api/04-validators/01-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ScalarValidator<T> valueOf(T val);
This validator contains the following function:
#### `.isBetween()`
#### `.isBetween(minVal, maxVal)`
```cpp
bool ScalarValidator<T>::isBetween(T minVal, T maxVal);
Expand All @@ -49,21 +49,21 @@ VectorElementValidator<T> eachElementOf(const std::vector<T>& vec);
This validator contains the following functions:
#### `.isBetween()`
#### `.isBetween(minVal, maxVal)`
```cpp
bool VectorElementValidator<T>::isBetween(T minVal, T maxVal);
```

Returns whether each element of `vec` is between `minVal` and `maxVal`, inclusive.

#### `.satisfies()`
#### `.satisfies(pred)`

```cpp
bool VectorElementValidator<T>::satisfies(std::function<bool(T)> predicate);
bool VectorElementValidator<T>::satisfies(std::function<bool(T)> pred);
```

Returns whether `predicate(e)` returns true for each `e` element of `vec`.
Returns whether `pred(e)` returns true for each `e` element of `vec`.

---

Expand All @@ -80,21 +80,21 @@ MatrixElementValidator<T> eachElementOf(const std::vector<std::vector<T>>& mat);
This validator contains the following functions:
#### `.isBetween()`
#### `.isBetween(minVal, maxVal)`
```cpp
bool MatrixElementValidator<T>::isBetween(T minVal, T maxVal);
```

Returns whether each element of `mat` is between `minVal` and `maxVal`, inclusive.

#### `.satisfies()`
#### `.satisfies(pred)`

```cpp
bool MatrixElementValidator<T>::satisfies(std::function<bool(T)> predicate);
bool MatrixElementValidator<T>::satisfies(std::function<bool(T)> pred);
```

Returns whether `predicate(e)` returns true for each `e` element of `mat`.
Returns whether `pred(e)` returns true for each `e` element of `mat`.

---

Expand All @@ -110,7 +110,7 @@ StringElementValidator eachCharacterOf(const std::string& str);
This validator contains the following functions:
#### `.isBetween()`
#### `.isBetween(minVal, maxVal)`
```cpp
bool StringElementValidator::isBetween(char minVal, char maxVal);
Expand Down

0 comments on commit 8195bfd

Please sign in to comment.