-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
[rfc]: Externalize schema validation #342
Comments
One problem I'm seeing with
Table stakes would be all errors...for form rendering for example. |
Well I guess validationAt would work if we iterate over each key. Just need to make sure our string key a position format is the same. However, this would require us to discover all the keys in question (might be arbitrarily nested, arrays, etc) |
Ok Another option instead of internalizing validation and settings errors dependent on the result of
That would give them the flexibility needed and decouples changeset from managing not only validations but creating errors as well. |
adopted-ember-addons/validated-changeset#166 (comment) Will provide a new changeset. Something like |
RFC
One broad goal we have is to potentially deprecate the use of ember-changeset-validations. Having both
ember-changeset
andember-changeset-validations
presents some confusion. If we went forward,ember-changeset
would be the single library we would use to validate our data.Currently, at a high level, the changeset API for validations is rather unintuitive and verbose.
e.g. ember-changeset-validations README
Do we need this? Here is an example of the migration.
Nominally, this could look like the following...
As long as schema adhered to the interface we defined (something like
isValid
and/orvalidate
methods), then we can detect errors in the current in progress changeset and error appropriately.https://github.com/jquense/yup
Upsides
Downsides
ref adopted-ember-addons/validated-changeset#166
The text was updated successfully, but these errors were encountered: