currency Validation changes #vhfw5w
This commit is contained in:
parent
877ff643c8
commit
58d2fe145c
@ -20,7 +20,7 @@ class Validation extends Provider
|
|||||||
Validator::extend('currency', function ($attribute, $value, $parameters, $validator) use(&$currency_code) {
|
Validator::extend('currency', function ($attribute, $value, $parameters, $validator) use(&$currency_code) {
|
||||||
$status = false;
|
$status = false;
|
||||||
|
|
||||||
if (!is_string($value) || (strlen($value) != 3)) {
|
if (!is_string($value)) {
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,6 +30,10 @@ class Validation extends Provider
|
|||||||
$status = true;
|
$status = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strlen($value) != 3) {
|
||||||
|
return $status;
|
||||||
|
}
|
||||||
|
|
||||||
$currency_code = $value;
|
$currency_code = $value;
|
||||||
|
|
||||||
return $status;
|
return $status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user