Skip to content

Bug: Validation: Placeholder replacement not working for complex validation rules #3774

@element-code

Description

@element-code

When using the following Syntax for the rules, Validation::fillPlaceholders() cant find the rules and fails to replace any placeholders

$rules = [
	'email' => [
		'rules' => ['required', 'trim', 'valid_email', 'max_length[191]', 'is_unique[users.email, id, {id}]'],
	]
]

Validation::run() handles this for the validation itself:

// Blast $rSetup apart, unless it's already an array.
$rules = $rSetup['rules'] ?? $rSetup;

PR Incomming

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions