respect-validation/tests/integration/rules/currencyCode.phpt
Henrique Moody 7f1eef6bf7
Improve several validation messages
I'm not a native English speaker, and the same goes for many
contributors from this library. Because of that, some messages just
don't sound very good, so I updated a lot of them.
2024-12-05 23:37:42 +01:00

15 lines
No EOL
515 B
PHP

--FILE--
<?php
require 'vendor/autoload.php';
exceptionMessage(static fn() => v::currencyCode()->assert('batman'));
exceptionMessage(static fn() => v::not(v::currencyCode())->assert('BRL'));
exceptionFullMessage(static fn() => v::currencyCode()->assert('ppz'));
exceptionFullMessage(static fn() => v::not(v::currencyCode())->assert('GBP'));
?>
--EXPECT--
"batman" must be a valid currency code
"BRL" must not be a valid currency code
- "ppz" must be a valid currency code
- "GBP" must not be a valid currency code