validator icon indicating copy to clipboard operation
validator copied to clipboard

Fix FieldError in Translate

Open xqbumu opened this issue 4 years ago • 7 comments

issue introduced in #707

Fixes Or Enhances

Make sure that you've checked the boxes below before you submit PR:

  • [x] Tests exist or have been written that cover this particular change.

@go-playground/admins

xqbumu avatar Dec 24 '20 09:12 xqbumu

Coverage Status

Coverage decreased (-0.005%) to 74.172% when pulling 5fbd8503fed687f99e168450c4f2c21d8e8d78ca on xqbumu:patch-1 into 9e2ea4038020b5c7e3802a21cfa4e3afcfdcd276 on go-playground:master.

coveralls avatar Dec 24 '20 09:12 coveralls

Can you please make similar change in ValidationErrors.Error? Forced type conversion to concrete unexported type prevents using mocks when testing for returned errors.

powerman avatar Mar 30 '21 06:03 powerman

Can you please make similar change in ValidationErrors.Error? Forced type conversion to concrete unexported type prevents using mocks when testing for returned errors.

Maybe we can delete the fe in ValidationErrors.Error ? @powerman

xqbumu avatar Mar 30 '21 08:03 xqbumu

Maybe we can delete the fe in ValidationErrors.Error ? @powerman

Yep, ve[i].Error() should works just fine.

powerman avatar Mar 30 '21 08:03 powerman

@xqbumu Thanks! @deankarn Can you please merge this? (BTW, you probably should add 1.16 to testing matrix.)

powerman avatar Mar 30 '21 08:03 powerman

Not sure if this is still close enough to be merged/merged with minor edits, but would it be possible for this to also cover this type assertion?

If not, I would be happy to make a PR that (tries to) address that individually/all these issues at once.

deefdragon avatar May 11 '22 09:05 deefdragon

I'm getting the same problem. Please, merge this.

joselitofilho avatar Jul 28 '22 10:07 joselitofilho