Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ export default class PersonalNoValidator {
async validate(key, newValue, oldValue, changes, content) {
try {
await fetch(
'/api/personal-no/validation',
{
method: 'POST',
'/api/personal-no/validation',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ data: newValue })
}
);

return true;
} catch (_) {
return 'Personal No is invalid';
Expand Down Expand Up @@ -520,7 +520,11 @@ internationalisation (i18n) for example, or finer-grained error output.
To have `ember-changeset-validations` return such data structure, add the following to you `config/environment.js`

```
ENV['changeset-validations'].rawOutput = true;
let ENV = {
...
'changeset-validations': { rawOutput: true }
...
}
```

This will return an object with the following structure, that you can then pass to your applications's error processing:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
},
"dependencies": {
"ember-changeset": "^3.13.1",
"ember-cli-babel": "^7.8.0",
"ember-cli-babel": "^7.11.1",
"ember-cli-htmlbars": "^4.0.5",
"ember-get-config": "^0.2.4",
"ember-validators": "^3.0.1"
Expand Down
Loading