mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Fix live validation
This commit is contained in:
parent
8d15095bb2
commit
d73484fb69
@ -71,7 +71,7 @@ jQuery(function ($) {
|
|||||||
*/
|
*/
|
||||||
UserForm.prototype.validationOptions = {
|
UserForm.prototype.validationOptions = {
|
||||||
ignore: ':hidden',
|
ignore: ':hidden',
|
||||||
errorClass: 'required',
|
errorClass: 'error',
|
||||||
errorElement: 'span',
|
errorElement: 'span',
|
||||||
errorPlacement: function (error, element) {
|
errorPlacement: function (error, element) {
|
||||||
error.addClass('message');
|
error.addClass('message');
|
||||||
@ -500,11 +500,9 @@ jQuery(function ($) {
|
|||||||
|
|
||||||
// Extend the default validation options with conditional options
|
// Extend the default validation options with conditional options
|
||||||
// that are set by the user in the CMS.
|
// that are set by the user in the CMS.
|
||||||
if (CONSTANTS.ENABLE_LIVE_VALIDATION) {
|
if (CONSTANTS.ENABLE_LIVE_VALIDATION === false) {
|
||||||
$.extend(UserForm.prototype.validationOptions, {
|
$.extend(UserForm.prototype.validationOptions, {
|
||||||
onfocusout: function (element) {
|
onfocusout: false
|
||||||
this.element(element);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user