JWT Rule

Validate a JSON Web Token

129k Downloads / Month

Open Source MIT License

Learn how to validate the JSON Web Token format with the additional validation rules of Intervention Validation for your Laravel application.

public Intervention\Validation\Rules\Jwt::__construct()

The value under validation must be a in format of a JSON Web Token.

Parameters

none

Example

use Illuminate\Support\Facades\Validator;
use Intervention\Validation\Rules\Jwt;

$validator = Validator::make($request->all(), [
    'attribute-key' => new Jwt(),
]);
Edit