Custom error strings
Some of the error messages that show up on form validation read a bit awkwardly in my opinion (such as "is required"), so I would like to provide my own. Is there any way to do this other than intercepting them in the
CoreComponents.translate_error/1
function in the Phoenix 1.7 project template?7 Replies
generate .pot files and provide an alternate translation there?
That seems the only way to do it.
Solution
Search for it on that page
I can't quite make sense of the example given there. Are you able to point me at some concrete examples of using
transform_errors
? Once I figure it out for my own app, I'll try fleshing out the AshPhoenix doc in a PR.
Actually, never mind, I think I've got it. The broken formatting of the code snippet was confusing me.
Is it possible to do this with AshAuthenticationPhoenix UI overrides?I don't think it can right now but a PR for adding an override for it would be welcome
I might have a crack at it. I'm partly glad I wasn't missing something obvious. 😅