Skip to content

Improved Validation and Documentation

Latest

Choose a tag to compare

@biyrololo biyrololo released this 28 Jul 14:38

Release Notes v1.0.3

This release focuses on improving the robustness of the form validation, enhancing the developer experience with better documentation, and providing
more comprehensive usage examples.

✨ Features

  • Input Name Validation: The handleChange function now verifies that the input's name attribute corresponds to a key in the Zod schema. This prevents
    accidental updates to the form state with invalid field names and logs an error to the console if a mismatch occurs.

🐛 Fixes

  • Improved Validation Error Handling: The validation logic now gracefully handles Zod issues that may not have a path associated with them, preventing
    potential runtime errors and ensuring smoother validation.

📚 Documentation

  • JSDoc Comments: Added detailed JSDoc comments to useForm and its return types, improving IntelliSense and providing clearer guidance for developers
    within their IDE.
  • New README Example: The README.md has been updated with a more advanced example demonstrating how to integrate solidjs-hook-form with custom input
    components and a more complex validation schema.