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

error status is not updated after value is set by js #89

Closed
cai123456jun opened this issue Oct 20, 2014 · 1 comment
Closed

error status is not updated after value is set by js #89

cai123456jun opened this issue Oct 20, 2014 · 1 comment

Comments

@cai123456jun
Copy link

for example:
html:
<input name="exam" type=text id=exam />
<input name="totalScore" type=text id=totalScore />
<input name="outstandingScore" type=text id=outstandingScore/>

JS:
$('#totalScore').change(function (evt) {
var score = parseInt($('#totalScore').val());
$('#outstandingScore').val(score * 0.9);
});

    var metrics = [
        [ '#exam', 'presence', 'cannot be empty' ],
        [ '#totalScore', 'presence', 'cannot be empty' ],
        [ '#outstandingScore', 'presence', 'cannot be empty' ]
    ];

so if someone types something in the #totalScore, #outstandingScore will be populated automatically inside change event. but after change event, error is still set on #outstandingScore

@cai123456jun
Copy link
Author

my bad. needs to do : xxx.val(abc).change().

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

No branches or pull requests

1 participant