✨ feat: add Svelte actions and global stores for enhanced functionality
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export const FORM_CONTEXT = Symbol("FORM_CONTEXT")
|
||||
|
||||
export interface ValidatableField {
|
||||
validate: () => Promise<boolean> | boolean
|
||||
reset: () => void
|
||||
focus?: () => void
|
||||
}
|
||||
|
||||
export interface FormContext {
|
||||
register: (field: ValidatableField) => void
|
||||
unregister: (field: ValidatableField) => void
|
||||
}
|
||||
Reference in New Issue
Block a user