hotfix(dataset): correct embargo date validation message
- Corrected the embargo date validation message in both the DatasetController and dataset validator to ensure consistency. - Updated the `embargo_date.date.afterOrEqual` message to dynamically display the correct date (10 days from now) in the desired format.
This commit is contained in:
parent
106f8d5f27
commit
dbd2bf2e9d
3 changed files with 3 additions and 1 deletions
|
@ -806,6 +806,8 @@ export default class DatasetController {
|
||||||
'files.array.minLength': 'At least {{ min }} file upload is required.',
|
'files.array.minLength': 'At least {{ min }} file upload is required.',
|
||||||
'files.*.size': 'file size is to big',
|
'files.*.size': 'file size is to big',
|
||||||
'files.*.extnames': 'file extension is not supported',
|
'files.*.extnames': 'file extension is not supported',
|
||||||
|
|
||||||
|
'embargo_date.date.afterOrEqual': `Embargo date must be on or after ${dayjs().add(10, 'day').format('DD.MM.YYYY')}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
// public async release({ params, view }) {
|
// public async release({ params, view }) {
|
||||||
|
|
|
@ -496,6 +496,7 @@ let messagesProvider = new SimpleMessagesProvider({
|
||||||
'files.array.minLength': 'At least {{ min }} file upload is required.',
|
'files.array.minLength': 'At least {{ min }} file upload is required.',
|
||||||
'files.*.size': 'file size is to big',
|
'files.*.size': 'file size is to big',
|
||||||
'files.*.extnames': 'file extension is not supported',
|
'files.*.extnames': 'file extension is not supported',
|
||||||
|
'embargo_date.date.afterOrEqual': `Embargo date must be on or after ${dayjs().add(10, 'day').format('DD.MM.YYYY')}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
createDatasetValidator.messagesProvider = messagesProvider;
|
createDatasetValidator.messagesProvider = messagesProvider;
|
||||||
|
|
|
@ -24,7 +24,6 @@ import FormControl from '@/Components/FormControl.vue';
|
||||||
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue';
|
import FormCheckRadioGroup from '@/Components/FormCheckRadioGroup.vue';
|
||||||
import BaseButton from '@/Components/BaseButton.vue';
|
import BaseButton from '@/Components/BaseButton.vue';
|
||||||
import { stardust } from '@eidellev/adonis-stardust/client';
|
import { stardust } from '@eidellev/adonis-stardust/client';
|
||||||
// import { Inertia } from '@inertiajs/inertia';
|
|
||||||
import CardBoxModal from '@/Components/CardBoxModal.vue';
|
import CardBoxModal from '@/Components/CardBoxModal.vue';
|
||||||
import BaseIcon from '@/Components/BaseIcon.vue';
|
import BaseIcon from '@/Components/BaseIcon.vue';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue