Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292069

Empty state is wrong for input when filled with whitespaces

$
0
0

Problem/Motivation

The states API check does not trim withespaces

state if input-text field is empty -> then disable submit

So empty behavior is different between PHP and States API

Steps to reproduce

- form with input (none-required) and submit button enabled by state
- entering any spaces chars returns state as non-empty

Proposed resolution

use trim() on input value for the state

Remaining tasks

- add test case to illustrate error (probably custom form with non-required input)
- MR/review/commit

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 292069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>