Feature No Code Attached Yet
avatar ceford
ceford
17 Nov 2020

Steps to reproduce the issue

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

Expected result

Field could be validated before submission

Actual result

Field is not validated

System information (as much as possible)

Additional comments

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?

avatar ceford ceford - open - 17 Nov 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Nov 2020
avatar bembelimen
bembelimen - comment - 28 Dec 2020

Feel free to make a PR ?

avatar saumyasarkar11
saumyasarkar11 - comment - 14 Mar 2021

Feel free to make a PR

What if I disable the save button if there's no text in the title?

avatar Hackwar Hackwar - change - 20 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 20 Feb 2023
avatar Hackwar Hackwar - change - 18 Nov 2024
Labels Added: Feature
Removed: bug
avatar Hackwar Hackwar - labeled - 18 Nov 2024
avatar Hackwar Hackwar - unlabeled - 18 Nov 2024

Add a Comment

Login with GitHub to post a comment