Skip to content

Commit ba0c6ea

Browse files
chore(docs): update HasLength class name (#1631)
1 parent 1de8127 commit ba0c6ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/1-essentials/03-database.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ A common use case in many applications is to represent persisted data as objects
129129
These objects don't have to implement any interface—they may be plain-old PHP objects:
130130

131131
```php app/Book.php
132-
use Tempest\Validation\Rules\Length;
132+
use Tempest\Validation\Rules\HasLength;
133133
use App\Author;
134134

135135
final class Book
136136
{
137-
#[Length(min: 1, max: 120)]
137+
#[HasLength(min: 1, max: 120)]
138138
public string $title;
139139

140140
public ?Author $author = null;
@@ -404,14 +404,14 @@ People who are used to Eloquent might prefer a more "active record" style to han
404404

405405
```php
406406
use Tempest\Database\IsDatabaseModel;
407-
use Tempest\Validation\Rules\Length;
407+
use Tempest\Validation\Rules\HasLength;
408408
use App\Author;
409409

410410
final class Book
411411
{
412412
use IsDatabaseModel;
413413

414-
#[Length(min: 1, max: 120)]
414+
#[HasLength(min: 1, max: 120)]
415415
public string $title;
416416

417417
public ?Author $author = null;

0 commit comments

Comments
 (0)