Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vivian05 opened this issue Feb 3, 2020 · 9 comments

Comments

@vivian05
Copy link

vivian05 commented Feb 3, 2020

No description provided.

@stuyam
Copy link
Collaborator

stuyam commented Feb 3, 2020

Can you give me an example?

@vivian05
Copy link
Author

vivian05 commented Feb 4, 2020

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

@stuyam
Copy link
Collaborator

stuyam commented Feb 4, 2020

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.

@vivian05
Copy link
Author

vivian05 commented Feb 6, 2020

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

@TranTuanManh
Copy link

Same me. How to fix this bug?

@EgoMaw
Copy link
Contributor

EgoMaw commented Sep 26, 2022

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!

@stuyam
Copy link
Collaborator

stuyam commented Sep 29, 2022

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

@EgoMaw
Copy link
Contributor

EgoMaw commented Oct 1, 2022

I've just PRed a fix! #425

@stuyam
Copy link
Collaborator

stuyam commented Oct 6, 2022

Fixed in latest v1.6.2 release.

@stuyam stuyam closed this as completed Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants