Skip to content

Commit ab5c886

Browse files
committed
Updated the README showing how to do validation
1 parent cc56982 commit ab5c886

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ $notation = new FenNotation('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq
3535
echo $notation->toString(); // or cast it: (string)$notation
3636
```
3737

38+
### Validating a FEN
39+
40+
```php
41+
use ChessZebra\ForsythEdwardsNotation\Validator;
42+
43+
$validator = new Validator();
44+
45+
$validationResult = $validator->validate('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1');
46+
47+
// $validationResult is a ValidationResult constant.
48+
```
49+
3850
## Contributing
3951

4052
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

0 commit comments

Comments
 (0)