Empty string should be considered the same as no value for parameters

Issue #8 resolved
Michael Granger
repo owner created an issue

When validating parameters, an empty string is currently treated as a value instead of a null.

This means that:

  • Validation patterns for optional parameters must be made to match the empty string to avoid empty string values from being marked as invalid.
  • Empty values provided for required parameters are marked as invalid instead of missing if they are blank. This also means that validation patterns for required parameters must be checked to ensure they don't match the empty string, lest they be considered accidentally valid despite being empty.

To fix this, the ParamValidator should treat empty strings the same as null or nil values.

Comments (1)

  1. Log in to comment