Skip to content

Validate input_text in fill_form endpoint #376

@Lochit-Vinay

Description

@Lochit-Vinay

Problem

The fill_form endpoint currently does not validate the input_text field.

Empty or whitespace-only input can be passed, which may lead to:

  • Unnecessary processing
  • Unexpected behavior in downstream components

Proposed Solution

Add validation to ensure that input_text is not empty or whitespace-only.

Example:

if not form.input_text.strip():
    raise AppError("Input text cannot be empty", status_code=400)

I would like to work on this and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions