omgebouwd naar adonisjs, werkt nog niet echt goed
This commit is contained in:
1 parent
dfd3336447
commit
62f1767df3
89 files changed
+9892
-1174
No files matched your search
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validator file
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The validator file is used for configuring global transforms for VineJS.
|
||||
| The transform below converts all VineJS date outputs from JavaScript
|
||||
| Date objects to Luxon DateTime instances, so that validated dates are
|
||||
| ready to use with Lucid models and other parts of the app that expect
|
||||
| Luxon DateTime.
|
||||
|
|
||||
*/
|
||||
|
||||
import { DateTime } from 'luxon'
|
||||
import { VineDate } from '@vinejs/vine'
|
||||
|
||||
declare module '@vinejs/vine/types' {
|
||||
interface VineGlobalTransforms {
|
||||
date: DateTime
|
||||
}
|
||||
}
|
||||
|
||||
VineDate.transform((value) => DateTime.fromJSDate(value))
|
||||
Reference in new issue
Block a user