Skip to content

Post form reports an invalid save_action under the visibility field #157

Description

@can3p

PostForm.Validate (pkg/forms/form_post_new.go) records the error for an invalid save_action with f.AddError("visibility", ...). The key looks copy-pasted from the visibility check just above it.

Repro: submit the post form with a valid visibility and save_action=bogus. The error appears under visibility, and save_action has none.

Expected: the error is recorded under save_action.

Pinned by the skipped test TestPostForm_Validate_FieldErrors/invalid_save_action_is_recorded_under_the_save_action_key (W2).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions