2018-09-07 03:03:04 +02:00
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
2019-02-09 11:44:33 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2018-09-07 03:03:04 +02:00
|
|
|
require 'vendor/autoload.php';
|
|
|
|
|
|
|
|
use Respect\Validation\Validator as v;
|
|
|
|
|
2023-04-01 07:20:05 +02:00
|
|
|
exceptionMessage(static fn() => v::pis()->check('this thing'));
|
|
|
|
exceptionMessage(static fn() => v::not(v::pis())->check('120.6671.406-4'));
|
|
|
|
exceptionFullMessage(static fn() => v::pis()->assert('your mother'));
|
|
|
|
exceptionFullMessage(static fn() => v::not(v::pis())->assert('120.9378.174-5'));
|
2018-09-07 03:03:04 +02:00
|
|
|
?>
|
2018-12-19 18:05:58 +01:00
|
|
|
--EXPECT--
|
2018-09-07 03:03:04 +02:00
|
|
|
"this thing" must be a valid PIS number
|
|
|
|
"120.6671.406-4" must not be a valid PIS number
|
|
|
|
- "your mother" must be a valid PIS number
|
|
|
|
- "120.9378.174-5" must not be a valid PIS number
|