diff --git a/docs/attributes.md b/docs/attributes.md index dc074bd..5f3673b 100644 --- a/docs/attributes.md +++ b/docs/attributes.md @@ -132,6 +132,15 @@ Str::make('name') ->maxLength(20); ``` +#### `enum` + +You can restrict the string to a set of possible values using the `enum` method. + +```php +Str::make('status') + ->enum(['to do', 'doing', 'done']); +``` + #### `pattern` You can also validate the string against a regular expression using the