Added form validators
This commit is contained in:
@@ -8,5 +8,21 @@ export type { SubmitFormArgs, SubmitFormResult } from './submitForm.js'
|
||||
export type { FormsCollectionOverrides, FormsFieldsOverride, FormsOption } from './types.js'
|
||||
export { useContactForm } from './useContactForm.js'
|
||||
export type { ContactFormErrors, ContactFormValues, SubmitAction } from './useContactForm.js'
|
||||
// Generic form engine (any field set) + the standard contact-form preset.
|
||||
export { useForm } from './useForm.js'
|
||||
export type { FormErrors, FormSubmitAction, Validator } from './useForm.js'
|
||||
export { validateSubmission } from './validateSubmission.js'
|
||||
export type { FormValidationResult } from './validateSubmission.js'
|
||||
// Composable validation rules (pure — safe on server or client).
|
||||
export {
|
||||
buildValidator,
|
||||
checked,
|
||||
custom,
|
||||
email,
|
||||
isEmail,
|
||||
maxLength,
|
||||
minLength,
|
||||
pattern,
|
||||
required,
|
||||
} from './validators.js'
|
||||
export type { Rule } from './validators.js'
|
||||
|
||||
Reference in New Issue
Block a user