This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ember-cp-validations migration continues #2
- Loading branch information
Showing
10 changed files
with
62 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
import DS from 'ember-data'; | ||
import EmberValidations from 'ember-validations'; | ||
import { Model } from 'ember-pouch'; | ||
import { validator, buildValidations } from 'ember-cp-validations'; | ||
|
||
export default Model.extend(EmberValidations, { | ||
from: DS.attr('string'), | ||
to: DS.attr('string'), | ||
const Validations = buildValidations({ | ||
from: validator('presence', true), | ||
to: validator('presence', true) | ||
}); | ||
|
||
validations: { | ||
from: { | ||
presence: true | ||
}, | ||
to: { | ||
presence: true | ||
} | ||
} | ||
export default Model.extend(Validations, { | ||
from: DS.attr('string'), | ||
to: DS.attr('string') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5198,7 +5198,7 @@ [email protected]: | |
fullcalendar "^3.6.0" | ||
fullcalendar-scheduler "^1.8.0" | ||
|
||
ember-getowner-polyfill@^1.0.0, ember-getowner-polyfill@^1.1.0, ember-getowner-polyfill@^1.2.2: | ||
ember-getowner-polyfill@^1.1.0, ember-getowner-polyfill@^1.2.2: | ||
version "1.2.2" | ||
resolved "https://registry.yarnpkg.com/ember-getowner-polyfill/-/ember-getowner-polyfill-1.2.2.tgz#cdab739e89cc8f25af0f78735422df1a61193e92" | ||
dependencies: | ||
|
@@ -5454,13 +5454,6 @@ ember-try@^0.2.15: | |
rsvp "^3.0.17" | ||
semver "^5.1.0" | ||
|
||
[email protected]: | ||
version "2.0.0-alpha.5" | ||
resolved "https://registry.yarnpkg.com/ember-validations/-/ember-validations-2.0.0-alpha.5.tgz#95af5bb5fcf43a5d18a6ddebe64594280bf988c0" | ||
dependencies: | ||
ember-cli-babel "^5.1.6" | ||
ember-getowner-polyfill "^1.0.0" | ||
|
||
[email protected]: | ||
version "1.0.4" | ||
resolved "https://registry.yarnpkg.com/ember-validators/-/ember-validators-1.0.4.tgz#7d89c2511945c52bd20c5384e715138f902133bb" | ||
|