fix(sequence-field): an argument for 'fnName' was not provided
This commit is contained in:
parent
07c373956c
commit
df4b42308c
@ -1,10 +1,10 @@
|
|||||||
import { DataTypes, Transactionable, ValidationError, ValidationErrorItem } from 'sequelize';
|
|
||||||
import parser from 'cron-parser';
|
import parser from 'cron-parser';
|
||||||
import moment from 'moment';
|
|
||||||
import { escapeRegExp } from 'lodash';
|
import { escapeRegExp } from 'lodash';
|
||||||
|
import moment from 'moment';
|
||||||
|
import { DataTypes, Transactionable, ValidationError, ValidationErrorItem } from 'sequelize';
|
||||||
|
|
||||||
|
import { BaseColumnFieldOptions, Field, FieldContext, Model } from '@nocobase/database';
|
||||||
import { Registry } from '@nocobase/utils';
|
import { Registry } from '@nocobase/utils';
|
||||||
import { Model, BaseColumnFieldOptions, Field, FieldContext } from '@nocobase/database';
|
|
||||||
|
|
||||||
|
|
||||||
export interface Pattern {
|
export interface Pattern {
|
||||||
@ -225,11 +225,13 @@ export class SequenceField extends Field {
|
|||||||
throw new ValidationError('sequence pattern not match', [
|
throw new ValidationError('sequence pattern not match', [
|
||||||
new ValidationErrorItem(
|
new ValidationErrorItem(
|
||||||
`input value of ${name} field not match the sequence pattern (${this.matcher.toString()}) which is required`,
|
`input value of ${name} field not match the sequence pattern (${this.matcher.toString()}) which is required`,
|
||||||
'Validation error', // NOTE: type should only be this which in sequelize enum set
|
'validation error', // NOTE: type should only be this which in sequelize enum set
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
instance,
|
instance,
|
||||||
'sequence_pattern_not_match'
|
'sequence_pattern_not_match',
|
||||||
|
name,
|
||||||
|
[],
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user