mirror of
https://github.com/directus/directus.git
synced 2026-01-30 06:18:09 -05:00
* Add "required" option to fields * Move some exceptions to shared * Do client side validation for required * Add conditional required support
13 lines
340 B
TypeScript
13 lines
340 B
TypeScript
import { BaseException } from '@directus/shared/exceptions';
|
|
|
|
type Exceptions = {
|
|
collection: string;
|
|
field: string;
|
|
};
|
|
|
|
export class ContainsNullValuesException extends BaseException {
|
|
constructor(field: string, exceptions?: Exceptions) {
|
|
super(`Field "${field}" contains null values.`, 400, 'CONTAINS_NULL_VALUES', exceptions);
|
|
}
|
|
}
|