Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #1216 [Live] Throwing an error when setting an invalid model …
…name (weaverryan) This PR was merged into the 2.x branch. Discussion ---------- [Live] Throwing an error when setting an invalid model name | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Tickets | From a Slack conversation | License | MIT Currently, if you use an invalid prop/model name in `data-model`, there is no error: the field is just silently *not* set. Now, we throw a clear error. It's possible (?) that people were relying on this - notably if someone is using a `<form data-model="*">` to auto-map every form field as a model... but only some exist on their component. However, 99% of the time people are using that with a Symfony form + `ComponentWithFormTrait`, where that will not be an issue. And I think if you have `data-model="*"`, you are saying that *every* field is a prop. For the sake of DX, we should fail loudly and not let users make accidents. Cheers! Commits ------- ed68c9c [Live] Throwing an error when setting an invalid model name
- Loading branch information