seems to work just fine now, needs translations

This commit is contained in:
spencerrlongg
2024-11-13 21:54:25 -06:00
parent 25163d1756
commit 7e7cbc4cc8
2 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -17,12 +17,12 @@ class AlphaEncrypted implements ValidationRule
{
try {
$decrypted = Crypt::decrypt($value);
dump($decrypted);
if (!ctype_alpha($decrypted)) {
if (!ctype_alpha($decrypted) && !is_null($decrypted)) {
$fail($attribute.' is not alphabetic.');
}
} catch (\Exception $e) {
$fail($e->getMessage());
report($e);
$fail('something went wrong.');
}
}
}