sometimes user enters text that cannot be coerced properly. e.g. string -> money. ‘123 USD’ can be coerced properly but ‘123 ZZZ’ or ‘dwerss’ can’t. one of the examples can be checked by regexp on client side but other can not. how should i handle those errors and display proper message to the user?
is it described in any tutorial? any link?
sometimes user enters text that cannot be coerced properly. e.g. string -> money. ‘123
Share
Try using a Translator as described by jumpstart and the wiki.
You can throw a ValidationException in the parseClient implementation if the input is entirely unusable.