Skip to content

Commit

Permalink
Improve text of string API reference on website
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Dec 9, 2023
1 parent 9dd7a59 commit 2cb2757
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion website/src/routes/api/(schemas)/string/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ const Schema = string(message, pipe);
- `message` <Property {...properties.message} />
- `pipe` <Property {...properties.pipe}/>

### Explanation

With `string` you can validate the data type of the input and with `pipe` you can transform and validate the further details of the string. If the input is not a string, you can use `message` to customize the error message.

## Returns

- `Schema` <Property {...properties.Schema} />

## Examples

With `string` you validate the data type of the incoming data and with the `pipe` you can then validate all further details. In the event of an error, the `message` parameter allows you to customize the error message.
The following examples show how `string` can be used.

### Email schema

Expand Down

0 comments on commit 2cb2757

Please sign in to comment.