Add violation path & code arguments to ApiValidationException

Created on 27 February 2024, about 1 year ago
Updated 19 April 2024, 12 months ago

Problem/Motivation

Add violation path & code arguments to ApiValidationException to make it easier to create violations in controllers, like this:

throw new ApiValidationException(
    message: 'A user with this email address already exists.',
    code: static::EMAIL_ADDRESS_ALREADY_EXISTS_ERROR,
    path: 'emailAddress',
);
Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024