Skip to content

enhancement: suggest similar fields in FieldError #52

@Einswilli

Description

@Einswilli

When a user provides a field name that doesn't exist, Ryx raises a FieldError. It would be much more helpful to suggest the closest matching field name.

Goal: Modify the field validation logic to suggest similar field names when a FieldError is raised.

Implementation hint:

  1. Use Python's difflib.get_close_matches to find the closest field names in model._meta.fields.
  2. Update the exception message to include: "Field 'foo' not found. Did you mean 'bar'?"

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions