-
Notifications
You must be signed in to change notification settings - Fork 140
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
Can't update a user, client validation issue #409
Comments
Thanks for the report @twig2let. I am able to recreate the issue and will look into this week. |
Sorry for the delay. It appears the I'm working on a Fae CMS this week and will use the opportunity to look into more. If nothing else, I may submit a workaround until this is fixed in Judge. thanks |
Any dirty-hack to temporary fix this? :) |
@mbajur - a quick hack I just used was to disable JS in my browser, make the edit to my account, then turn JS back on. You could also add a little JS snippet to remove that data-validate attr. |
Piggy backing off of what @jclemans was saying, here's some JS you can add to $(function() {
$('input.password').data('validate', '');
}); The Rails validations will still be in place (> 8 chars and matching confirmation), they just won't happen via JS. |
Issue #409 - fix bugs in stripValidation()
Brand new install v2.0.0.
Attempt to edit a user, http://0.0.0.0:3000/admin/users/1/edit
On save validation script throws exception: Uncaught TypeError: Cannot read property 'allow_blank' of undefined
The Password input data-validate tag contains JSON, so the Judge.ValidationQueue method fails.
data-validate="["{"kind":"length","options":{"minimum":8,"allow_blank":true},"messages":{"too_short":"is too short (minimum is 8 characters)"}}"]"
It appears to be the only input whose data-validate that isn't an Object.
Have I overlooked something?
Rails 5.0.7
ruby 2.5.1p57
Fae 2.0.0
The text was updated successfully, but these errors were encountered: