#4912 - Field input: Consider whether a blank value should be considered the same as a missing value

Identifier #4912
Issue type Feature request or suggestion
Title Field input: Consider whether a blank value should be considered the same as a missing value
Status Open
Tags

Roadmap: Over the horizon (custom)

Handling member Deleted
Addon core
Description Currently the post_param_string/get_param_string functions treat missing values differently to blank values.

A missing value triggers an error, unless a default value is provided (or null is set as the default).

A blank value is acceptable as a value unless the original form said it was a required field (handled via require__<name> fields).

We ideally should not rely on require__<name> being set on the form. May be we should just remove the above distinction and decouple the validation on the frontend from the validation on the backend.

Then again, doing so may create unexpected problems, and it removes the ability for the frontend to set the validation to subsequently happen on the frontend.

On balance I say we remove the distinction and work out any kinks caused by it later.
Steps to reproduce

Related to

#5206 - Bots submitting blank member contact form is irksome

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated