mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #968 from silverstripe-droptables/submitform-validation
Future-proof the submitForm for use with forms without validation.
This commit is contained in:
commit
e021a190b3
@ -243,7 +243,8 @@ jQuery.noConflict();
|
||||
$(button).addClass('loading');
|
||||
|
||||
// validate if required
|
||||
if(!form.validate()) {
|
||||
var validationResult = form.validate();
|
||||
if(typeof validationResult!=='undefined' && !validationResult) {
|
||||
// TODO Automatically switch to the tab/position of the first error
|
||||
statusMessage("Validation failed.", "bad");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user