Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joegaudet committed Jul 22, 2020
1 parent 72c9911 commit 3cdd421
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 26 deletions.
10 changes: 8 additions & 2 deletions addon/components/field-for.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@
/>
</div>

<ErrorsFor @errors={{this.errors}} @customErrorComponent={{this.formFor.customErrorComponent}} />
<ErrorsFor
@errors={{this.errors}}
@customErrorComponent={{this.formFor.customErrorComponent}}
/>
</div>
</AttachPopover>
{{else}}
Expand Down Expand Up @@ -160,7 +163,10 @@
/>
</div>

<ErrorsFor @errors={{this.errors}} @customErrorComponent={{this.formFor.customErrorComponent}} />
<ErrorsFor
@errors={{this.errors}}
@customErrorComponent={{this.formFor.customErrorComponent}}
/>
</div>
{{/if}}
{{/if}}
Expand Down
8 changes: 3 additions & 5 deletions addon/components/form-for.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,8 @@ export default class FormForComponent extends Component {
@arg(func)
runValidations = (validationOptions = null) => {
const model = this.model;
return model?.validate
? model.validate(validationOptions || this.validationOptions)
: true;
}
return model?.validate ? model.validate(validationOptions || this.validationOptions) : true;
};

/**
* Clears the validations on the model
Expand All @@ -627,7 +625,7 @@ export default class FormForComponent extends Component {
clearValidations = () => {
const model = this.model;
return model.validate && model.validate({ only: [] });
}
};

/**
* Used to inform parent forms that either this form, or one of its children submitted
Expand Down
38 changes: 19 additions & 19 deletions tests/dummy/app/controllers/docs/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,25 @@ export default class UsageController extends Controller {
toggleErrors() {
if (this.errors) {
this.anObject.errors = {
string: [{message:'String Error'}],
password: [{message:'Password Error'}],
text: [{message:'Text Error'}],
email: [{message:'Email Error'}],
url: [{message:'URL Error'}],
tel: [{message:'TEL Error'}],
search: [{message:'Search Error'}],
number: [{message:'Number Error'}],
currency: [{message:'Currency Error'}],
numberRange: [{message:'Number Range Error'}],
color: [{message:'Color Error'}],
date: [{message:'Date Error'}],
time: [{message:'Time Error'}],
datetime: [{message:'Datetime Error'}],
boolean: [{message:'Boolean Error'}],
select: [{message:'Select Error'}],
radio: [{message:'Select Error'}],
start: [{message:'Start Error'}],
end: [{message:'End Error'}],
string: [{ message: 'String Error' }],
password: [{ message: 'Password Error' }],
text: [{ message: 'Text Error' }],
email: [{ message: 'Email Error' }],
url: [{ message: 'URL Error' }],
tel: [{ message: 'TEL Error' }],
search: [{ message: 'Search Error' }],
number: [{ message: 'Number Error' }],
currency: [{ message: 'Currency Error' }],
numberRange: [{ message: 'Number Range Error' }],
color: [{ message: 'Color Error' }],
date: [{ message: 'Date Error' }],
time: [{ message: 'Time Error' }],
datetime: [{ message: 'Datetime Error' }],
boolean: [{ message: 'Boolean Error' }],
select: [{ message: 'Select Error' }],
radio: [{ message: 'Select Error' }],
start: [{ message: 'Start Error' }],
end: [{ message: 'End Error' }],
};
} else {
this.anObject.errors = {
Expand Down

0 comments on commit 3cdd421

Please sign in to comment.