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