for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Milwad\LaravelValidate\Rules;
use Illuminate\Contracts\Validation\Rule;
class ValidJwt implements Rule
{
/**
* Check jwt is valid.
*
* @param string $attribute
* @param mixed $value
* @return bool
*/
public function passes($attribute, $value)
return preg_match('/^[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+\.[a-zA-Z0-9-_]+$/', $value);
return preg_match('/^[a-...zA-Z0-9-_]+$/', $value)
integer
boolean
}
* Get the validation error message.
* @return string
public function message()
return __('validate.jwt');