class Utf8 implements Rule

Methods

bool
passes(string $attribute, mixed $value)

Determine if the validation rule passes.

string
message()

Get the validation error message.

Details

at line 21
bool passes(string $attribute, mixed $value)

Determine if the validation rule passes.

Strings with invalid UTF-8 byte sequences can't be stored in the database. This only happens with manipulated requests, e.g. from bots, but would otherwise produce a server error. NUL bytes are valid UTF-8 but PostgreSQL rejects them in text columns, too.

Parameters

string $attribute
mixed $value

Return Value

bool

at line 31
string message()

Get the validation error message.

Return Value

string