Aliases #65

Merged
merged 6 commits into from Jan 9, 2017

Projects

None yet

2 participants

@psvet
Contributor
psvet commented Jan 9, 2017

Closes #62

@psvet psvet self-assigned this Jan 9, 2017
src/lib/validators.js
+ * Alias for requiredIf
+ */
+ requireIf: function(def, value, key, errors, data) {
+ console.log('-----\n`requireIf` should be `requiredIf`\n-----')
@Fluidbyte
Fluidbyte Jan 9, 2017 Member

Let's make this a bit clearer:

-----\nObey Warning: `requireIf` should be `requiredIf`\n----- 
src/lib/validators.js
+ * Alias for requiredIfNot
+ */
+ requireIfNot: function(def, value, key, errors, data) {
+ console.log('-----\n`requireIfNot` should be `requiredIfNot`\n-----')
@Fluidbyte
Fluidbyte Jan 9, 2017 Member

Same as L97

src/rules.js
+ if (def.require) {
+ def.required = def.require
+ delete def.require
+ console.log('-----\n`require` should be `required`\n-----')
@Fluidbyte
Fluidbyte Jan 9, 2017 Member

Same as comments above

@Fluidbyte
Member

Besides the comments on the messaging 👍

@psvet psvet merged commit 0712c83 into master Jan 9, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@psvet psvet deleted the aliases branch Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment