Skip to content

Commit 691f5bb

Browse files
authored
[Doc]: fix rawOutput documentation (#291)
* [Doc]: fix rawOutput documentation * bump babel
1 parent de812f3 commit 691f5bb

File tree

3 files changed

+1049
-15
lines changed

3 files changed

+1049
-15
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ export default class PersonalNoValidator {
101101
async validate(key, newValue, oldValue, changes, content) {
102102
try {
103103
await fetch(
104-
'/api/personal-no/validation',
105-
{
106-
method: 'POST',
104+
'/api/personal-no/validation',
105+
{
106+
method: 'POST',
107107
headers: { 'Content-Type': 'application/json' },
108108
body: JSON.stringify({ data: newValue })
109109
}
110110
);
111-
111+
112112
return true;
113113
} catch (_) {
114114
return 'Personal No is invalid';
@@ -520,7 +520,11 @@ internationalisation (i18n) for example, or finer-grained error output.
520520
To have `ember-changeset-validations` return such data structure, add the following to you `config/environment.js`
521521

522522
```
523-
ENV['changeset-validations'].rawOutput = true;
523+
let ENV = {
524+
...
525+
'changeset-validations': { rawOutput: true }
526+
...
527+
}
524528
```
525529

526530
This will return an object with the following structure, that you can then pass to your applications's error processing:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"dependencies": {
3636
"ember-changeset": "^3.13.1",
37-
"ember-cli-babel": "^7.8.0",
37+
"ember-cli-babel": "^7.11.1",
3838
"ember-cli-htmlbars": "^4.0.5",
3939
"ember-get-config": "^0.2.4",
4040
"ember-validators": "^3.0.1"

0 commit comments

Comments
 (0)