#15591t3lib/jsfunc.validateform.js does not verify password fields
Description
Using a simple login form like this:
10 = FORM
10 {
dataArray {
10.label = Name
10.type = user=input
10.value = Name
10.required = 1
20.label = Passwort
20.type = pass=password
20.value = Passwort
20.required = 1
30.type = logintype=hidden
30.value = login
40.type = pid=hidden
40.value = {$styles.content.loginform.pid}
50.type = submit=submit
50.value = Login
}
layout = ###LABEL### ###FIELD###
type = 35
REQ = 1
}
Then in FE entering an empty password does not give a JS alert – although require is set for the password field in the TS code.
The reason is a missing “case” statement in t3lib/jsfunc.validateform.js (see “Additional Information”.
The bug can be resolved by a change to t3lib/jsfunc.validateform.js :
Change this block (starting around line 72):
switch(type) {
case text case textarea value = fObj.value;
break;
to this:
switch(type) {
case text case textarea case password value = fObj.value;
break;
(issue imported from #M2515)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.