init commit
All checks were successful
build-api-image / build (push) Successful in 51s

This commit is contained in:
Antonio Lopes dos Santos
2026-08-04 16:52:02 -03:00
commit afec302c3e
11594 changed files with 1636728 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class IbgeEstado implements Rule
{
/**
* Determine if the validation rule passes.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
{
self::isValid($value);
}
public static function isValid($value)
{
return !is_null($value) && strlen($value) === 2;
}
/**
* Get the validation error message.
*
* @return string
*/
public function message()
{
return 'IBGE do estado inválido.';
}
}