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

支持自动获取display #121

Closed
niceue opened this Issue Apr 10, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@niceue
Copy link
Owner

niceue commented Apr 10, 2014

通过function回调的方式

$('form').validator({
    display: function(element) {
        return $(element).parent().prev().text();
    },
    fields: {
       'user': {
            rule: 'required; username',
            display: function(element) {
                return $(element).parent().prev().text();
            }
       }
    }
});

@niceue niceue added this to the 0.8.0 milestone Apr 10, 2014

@niceue niceue added the feature label Apr 10, 2014

@niceue niceue self-assigned this Apr 10, 2014

@niceue niceue modified the milestones: 0.7.1, 0.8.0 May 17, 2014

@niceue niceue closed this in 37260c0 May 17, 2014

@niceue niceue added the documentation label Jul 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment