Logical API errors throw stable codes so users see translated messages instead of a generic bad request. Co-authored-by: Cursor <cursoragent@cursor.com>
11 lines
370 B
TypeScript
11 lines
370 B
TypeScript
import { IsOptional, IsString, Matches } from 'class-validator';
|
|
import { ErrorCode } from '../../../common/errors';
|
|
|
|
export class ColumnProvidersQueryDto {
|
|
/** Local calendar date (YYYY-MM-DD) used to resolve weekday working hours. */
|
|
@IsOptional()
|
|
@IsString()
|
|
@Matches(/^\d{4}-\d{2}-\d{2}$/, { message: ErrorCode.APPOINTMENT_INVALID_DATE })
|
|
date?: string;
|
|
}
|