pixabay.com |
In my case, I have an issue that my current project needs me to translate the validator error message from English into Bahasa Indonesia. there is an example in the go-playground validator repository that we can switch the validator message into another language. Thank god, there is an Indonesian developer who contributes that repository to translate the message into Bahasa Indonesia.
after implementing code from go-playground documentation, then I got next issue, the thing is we need to implement the current docs into the echo framework version, which is not suitable at all, you will find an error, and then my mind got stuck, and I got an hour to think about it.
after an hour of reading the library, reading the documentation, reading the echo framework version, and then I got a suitable solution and very nice implementation, and I think you would think the same. then Here is the gist.