This project has been deprecated.
It hasn’t been updated for over half a decade, and much better alternatives exists now.
The old code is available here: github.com/augustl/live-validations/tree/5cc92cac215152713105b96b1ff7cab15322b697
No longer maintained.
This project has been deprecated.
It hasn’t been updated for over half a decade, and much better alternatives exists now.
The old code is available here: github.com/augustl/live-validations/tree/5cc92cac215152713105b96b1ff7cab15322b697
There has been a few reports of validates_format_of not working properly. Investigate, and fix.
Live-validations uses a self generated dom_id to id the html form. I would like to use my own custom form id and still keep the live-validations functionality
Live validations was not working on my freshly generated scaffolding.
It was not working because there are underscores in my form field names generated by rails but not in the javascript generated by the live_validations plugin.
Here is an example:
$('#new_sms_message').validate({"messages": {"smsmessage[number]": {"required": "can't be blank", "digits": "is not a number"}, "smsmessage[message]": {"required": "can't be blank"}}, "rules": {"smsmessage[number]": {"required": true, "minlength": 10, "digits": true}, "smsmessage[message]": {"required": true, "maxlength": 160}}})
// Manually corrected the javascript and it worked correctly:
$('#new_sms_message').validate({"messages": {"sms_message[number]": {"required": "can't be blank", "digits": "is not a number"}, "sms_message[message]": {"required": "can't be blank"}}, "rules": {"sms_message[number]": {"required": true, "minlength": 10, "digits": true}, "sms_message[message]": {"required": true, "maxlength": 160}}})
Validates_uniqueness_of works great when creating a new record but not when I attempt to edit data of an existing record.
Maybe there is something wrong on my end.
For example, I have a user and validate_uniqueness_of the email and username.
I allow the user the ability to change their email address (but still want to validate it's uniqueness)
Whenever I try to save the record I was editing, I get the "has already been taken" validation error (it's only taken by the current user). It gives this error even if I was changing other fields that are not validated. When I turn off live validations the regular rails validations work fine.
Also, I'm using validates_confirmation_of :password; and it is validating and showing the error "doesn't match confirmation" even though nothing was entered in the new_password field.
Is there any explanation of this behavior? Is live validations only meant to validate records before creation and not for editing? I have gotten around the issue by only validating my fields on create but I want to make sure the user's email is unique even when they are editing their account settings.
Thanks for any tips.
I use a variety of validation, all working correctly.
Except validates_length_of, which does not display i18n translations of errors not even :message attribute of validation helper.
Always displays the message "Please enter at least X characters." . I need i18n OR ability to set own :message at least.
THX
Line 33 of view_helpers.rb:
Remove block.binding.
And nested attributes. Gogo!
Support also form_tag with livevalidations and not only form_for
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.