Skip to content

Releases: darianstlex/efx-forms

Errors and validation fixes, docs

Choose a tag to compare

@darianstlex darianstlex released this 26 May 00:58
099da6f

Release Notes

🎉 Major Highlights

📚 Complete Documentation Site

  • New Docusaurus documentation site with comprehensive API reference
  • Examples section with basic, validation, and advanced patterns
  • AI integration guide for form generation
  • Deployed to GitHub Pages

🚀 New Features

Type Safety Improvements

  • 9 new type aliases replacing Record<string, any>:
    • IRValues, IRErrors, IRError, IRBoolean, IRTrue
    • IValuePayload, IBooleanPayload, IErrorsPayload
    • TFieldValidator
  • Better TypeScript intellisense and error messages
  • No breaking changes - fully backward compatible

Error Handling Documentation

  • setErrors vs replaceErrors clearly documented
  • setErrors: merges errors (preserves existing)
  • replaceErrors: replaces all errors (for server validation)
  • Submit validation uses replaceErrors for clean state

Form-Level Error Pattern documented

  • __form__ or similar key for form-level errors
  • Access via error.__form__ from useFormData()
  • Coexists with field-level errors
  • No new API - uses existing error store

🔧 Improvements

Hook API Corrections

  • resetField and resetUntouched properly exported from useForm
  • Documentation matches actual implementation
  • Config methods documented as EventCallable (not synchronous functions)

🐛 Bug Fixes

Validation Behavior

  • Changes submit validation logic, replaces all errors including client
  • skipClientValidation checks use consistent data access pattern
  • FormComponent uses useLayoutEffect for config synchronization

Add react 19

Choose a tag to compare

@darianstlex darianstlex released this 26 Jan 15:38
2.0.28

chore: react 19, clean up

Add flattenObjectKeys, serialize

Choose a tag to compare

@darianstlex darianstlex released this 09 Sep 19:03
  • flattenObjectKeys - utility to flatten values object for nested fields
  • serialize - enable/disable form stores serialization, mostly for SSR
  • add missing SIDs

Passive field

Choose a tag to compare

@darianstlex darianstlex released this 04 Aug 21:17

Mark field as passive, to skip active state and config update

Fix touches, validators

Choose a tag to compare

@darianstlex darianstlex released this 04 Aug 10:51
2.0.25

fix: touches, validators

Readme

Choose a tag to compare

@darianstlex darianstlex released this 30 Jul 20:05
2.0.24

chore: readme

Add useStoreProp, useStorePropFn

Choose a tag to compare

@darianstlex darianstlex released this 30 Jul 14:45

Add useStoreProp, useStorePropFn and refactor hooks components

Fix `useFieldStore` types

Choose a tag to compare

@darianstlex darianstlex released this 28 Jul 22:34
2.0.22

fix: useFieldStore types

Add useFormMethods

Choose a tag to compare

@darianstlex darianstlex released this 28 Jul 21:38
  • Add useFormMethods
  • refactor update logic
  • remove untouched update events

Add resetField, fix activate/deactivate

Choose a tag to compare

@darianstlex darianstlex released this 27 Jul 20:53
2.0.20

feat: resetField, fix initial value, activate/deactivate