8000 Provide public interface to current value of `Entry.validationError`. · Issue #5717 · fyne-io/fyne · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Provide public interface to current value of Entry.validationError. #5717
Open
@bobhy

Description

@bobhy

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

I want to write unit tests for a validated entry field which is embedded in a Form. I'd like the test to simply feed the Form a long list of test cases and be able to compare error status along with other expected outputs for each.
I know I could invoke the validation routine directly (with a variety of inputs), but that's not my testing style.

Is it possible to construct a solution with the existing API?

I do have a workaround: I can patch the existing validator and replace it with my own which invokes the old validator and saves the last error status somewhere my test can access it.

Describe the solution you'd like to see.

For me, Entry.GetValidationError() would be fine.
There's already Entry.SetValidationError(), so you'd be perfecting the symmetry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0