adopted-ember-addons / adopted-ember-addons/ember-cp-validations
Error message from custom validation not showing
- 主要語言
- JavaScript
- 星號
- 439
- 分支
- 172
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### Environment
- Ember CLI Version: 3.1.4
- Ember CP Validations Version: 4.0.0-beta.2
### Steps to Reproduce
I'm checking for a unique username from an [Airtable](https://airtable.com/) "spreadsheet". The validation seems to be working but the error message is not showing. Not sure why.
```js
const UniqueEmail = BaseValidator.extend({
validate(value, options, model, attribute) {
return base('Base Name').select({
fields: ['email'],
filterByFormula: `{email} = "${value}"`
}).firstPage((err, records) => {
if (err) { throw err; }
if (records.length) {
return 'Email address already exists.';
} else {
return true;
}
});
}
});
```
Any help would be appreciated. Thx!
貢獻指南
評估
這個 Issue 還沒有評估資料。