Go to Content / Article / New
Enter just a single space in the Title field and click Save
The form is submitted but not saved because of the server side check
Field could be validated before submission
Field is not validated
The Javascript code to validate the field would be very simple:
function (value) {
if (value.length === 0) {
return true;
}
return value.trim().length > 0;
});
Questions:
Is it worth doing this at all?
Should it be done on demand by including a class attribute in the form xml file?
Should it be done by default for all text and textarea fields?
Should I tackle this myself or leave it for a more experienced Javascript developer?
Feel free to make a PR
What if I disable the save button if there's no text in the title?
Labels |
Added:
No Code Attached Yet
bug
Removed: ? |
Labels |
Added:
Feature
Removed: bug |
Feel free to make a PR?