Last active
May 10, 2021 18:23
-
-
Save jelhan/8687b828162c979dceef152ba69d1be8 to your computer and use it in GitHub Desktop.
ember-changeset-validations-validateConfirmation-undefined
This file contains hidden or 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
import Changeset from 'ember-changeset'; | |
import Ember from 'ember'; | |
import PasswordValidations from '../validations/password'; | |
import lookupValidator from 'ember-changeset-validations'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init() { | |
this._super(...arguments); | |
this.set('changeset', new Changeset({ | |
password: 'test', | |
passwordConfirmation: undefined, | |
passwordConfirmation2: null | |
}, lookupValidator(PasswordValidations), PasswordValidations)); | |
} | |
}); |
This file contains hidden or 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
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0" | |
}, | |
"addons": { | |
"ember-bootstrap": "1.0.0-beta.2", | |
"ember-bootstrap-changeset-validations": "1.0.0-alpha.2", | |
"ember-changeset": "1.3.0", | |
"ember-changeset-validations": "1.2.8", | |
"ember-data": "2.12.1" | |
} | |
} |
This file contains hidden or 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
import { | |
validateConfirmation, | |
validateLength | |
} from 'ember-changeset-validations/validators'; | |
export default { | |
password: validateLength({ | |
allowNone: false, | |
min: 3 | |
}), | |
passwordConfirmation: validateConfirmation({ on: 'password' }), | |
passwordConfirmation2: validateConfirmation({ on: 'password' }) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment