mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
removen unnecessary code
This commit is contained in:
committed by
Aaro Koivukangas
parent
fb25b856ff
commit
fe8eecd2f2
@@ -202,7 +202,7 @@ export const validateReference = (
|
||||
exact_date: {
|
||||
name: 'exact_date',
|
||||
required: true,
|
||||
regexCheck: dateCheck,
|
||||
asString: dateCheck,
|
||||
condition: (data: Partial<EditDataType<ReferenceDetailsType>>) => {
|
||||
const ids: number[] = [6, 7, 10, 11, 12, 13, 14]
|
||||
return data.ref_type_id != null && ids.includes(data.ref_type_id)
|
||||
|
||||
@@ -10,7 +10,6 @@ type Validator = {
|
||||
asString?: ((str: string) => ValidationError) | boolean
|
||||
miscCheck?: (obj: object) => ValidationError
|
||||
miscArray?: (data: object[]) => ValidationError
|
||||
regexCheck?: (str: string) => ValidationError
|
||||
condition?: (data: object) => boolean // Validator is run if condition returns true, example in ./reference
|
||||
useEditData?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user