Skip to content

Conversation

jiji-hoon96
Copy link

This PR introduces the disableFieldMapping feature that allows developers to selectively disable schema validation error mapping for specific fields or globally across all fields in a form.

  • Core Feature: Added disableFieldMapping option to FormOptions interface
  • Type Definitions: Added FieldMappingConfig type supporting boolean or field-specific configuration
  • Core Logic: Implemented shouldApplySchemaToField method in FormApi to determine field-level schema application
  • Validation Filtering: Modified schema validation error mapping to respect disableFieldMapping settings
  • Framework Support: All adapters (React, Angular, Lit) automatically support the new option through existing FormOptions passthrough
  • Documentation: Added comprehensive guide and React example demonstrating usage patterns
  • Tests: Added complete test suite covering all scenarios including runtime configuration changes

How to test the changes?

  • Unit Tests: Run pnpm test:lib - all 385+ existing tests pass + new comprehensive test suite
  • Example: Navigate to examples/react/disable-field-mapping and run pnpm dev
  • Manual Testing: Try different configurations:
    • disableFieldMapping: true (global disable)
    • disableFieldMapping: { fields: { fieldName: true } } (selective disable)
    • Runtime configuration changes via form.update()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant