Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve field name validation #261

Closed
jackton1 opened this issue Apr 10, 2021 · 0 comments
Closed

Improve field name validation #261

jackton1 opened this issue Apr 10, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@jackton1
Copy link
Member

jackton1 commented Apr 10, 2021

Is your feature request related to a problem? Please describe.
I'll like to include field names that would be valid with possible warnings when the field is renamed.

This should also include validating all fields listed below:

Explicit

Field Names Description
_clone_fields Restrict the list of fields to copy from the instance (By default: Copies all fields excluding auto-created/non editable model fields)
_clone_m2m_fields Restricted Many to many fields (i.e Test.tags)
_clone_m2o_or_o2m_fields Restricted Many to One/One to Many fields
_clone_o2o_fields Restricted One to One fields

Implicit

Field Names (include all except these fields.) Description
_clone_excluded_fields Excluded model fields.
_clone_excluded_m2m_fields Excluded many to many fields.
_clone_excluded_m2o_or_o2m_fields Excluded Many to One/One to Many fields.
_clone_excluded_o2o_fields Excluded one to one fields.

Describe the solution you'd like
Add checks that includes verifying the field names using the current instance.

@jackton1 jackton1 added this to the Field Validation milestone Apr 10, 2021
@jackton1 jackton1 added the enhancement New feature or request label Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant