Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: align the interface with can-define-validate-validatejs.js #8

Closed
phillipskevin opened this issue Feb 13, 2018 · 1 comment · Fixed by #12
Closed

Proposal: align the interface with can-define-validate-validatejs.js #8

phillipskevin opened this issue Feb 13, 2018 · 1 comment · Fixed by #12

Comments

@phillipskevin
Copy link
Contributor

@frank-dspeed commented on Tue Feb 13 2018

In

you can use

var defineValidate = require('can-define-validate-validatejs');
var User = DefineMap.extend({
    name: {
        validate: {
            presence: true
        }
    }
});
// Attach methods to any instance created of `User`
defineValidate(User);

my proposal is to do the same for can-map-backup or can-define-backup which is even a better name

var defineBackup = require('can-define-backup'); // or can-map-backup
var User = DefineMap.extend({
    name: {
        validate: {
            presence: true
        }
    }
});
// Attach methods to any instance created of `User`
defineBackup(User);

@justinbmeyer commented on Tue Feb 13 2018

This would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants