Add violation path & code arguments to ApiValidationException

Created on 27 February 2024, 4 months ago
Updated 19 April 2024, 2 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.69.0 2024