simple-react-validator icon indicating copy to clipboard operation
simple-react-validator copied to clipboard

Abbreviation is shown as single letter words. How to change the message not convert the attribute names to humanized form ?

Open vivian05 opened this issue 4 years ago • 5 comments

vivian05 avatar Feb 03 '20 10:02 vivian05

Can you give me an example?

stuyam avatar Feb 03 '20 15:02 stuyam

@stuyam refer to the code https://codesandbox.io/s/vibrant-kilby-fhtff

vivian05 avatar Feb 04 '20 06:02 vivian05

That page isn't loading for me, can you past just a small example of the code? I don't need a working example just want to know a specific use case you are trying to use.

stuyam avatar Feb 04 '20 15:02 stuyam

Oops. here is the code {this.validator.message("ID ", this.state.val, "required")}

I expect 'The ID field is required' but this is what is shown 'The i d field is required' I'm missing something here

vivian05 avatar Feb 06 '20 06:02 vivian05

Same me. How to fix this bug?

TranTuanManh avatar Feb 27 '20 03:02 TranTuanManh

The issue seems to be because of an incorrect replacement adding an extra space here https://github.com/dockwa/simple-react-validator/blob/master/src/simple-react-validator.js#L247-L250 I can PR a fix if needed!

EgoMaw avatar Sep 26 '22 15:09 EgoMaw

@EgoMaw feel free to PR a fix if you understand the issue 👍

stuyam avatar Sep 29 '22 13:09 stuyam

I've just PRed a fix! https://github.com/dockwa/simple-react-validator/pull/425

EgoMaw avatar Oct 01 '22 15:10 EgoMaw

Fixed in latest v1.6.2 release.

stuyam avatar Oct 06 '22 13:10 stuyam