Stream: dotnet
Topic: Validation Messages
Brian Postlethwaite (Feb 18 2018 at 23:22):
Wondering if anyone has any thoughts on how they would like to update the Validation process to be able to customize the error messages so that they can be more friendly to users of an app?
(Not ones that make sense to a Specification Writer)
e.g. "[Field Display Name in ElementDefinition] is a mandatory field"
instead of "Instance count for 'Practitioner.identifier.type' is 0, which is not within the specified cardinality of 1..1"
Grahame Grieve (Feb 18 2018 at 23:27):
I will follow the discussion with interest. But generally, these errors should not get to the user of an app
Brian Postlethwaite (Feb 18 2018 at 23:37):
There needs to be enough detail in the error's coding to be able to construct the appropriate error message.
Since this isn't standardized as to the coding, how can a UI create these messages?
Brian Postlethwaite (Feb 18 2018 at 23:38):
We can do it for the .NET implementations, as we have a central code set, but if I call the validation on a HAPI fhir server, I won't have this detail, so what's my choice here?
Brian Postlethwaite (Feb 18 2018 at 23:39):
Maybe a more generalized issue to take to the Implementers chat?
Grahame Grieve (Feb 18 2018 at 23:49):
maybe. I'm cool to do some work standardizing this - would make testing easier, for a start. There is a test suite for the java validator, but I guess the dotnet validator doesn't use it
Brian Postlethwaite (Feb 18 2018 at 23:50):
I'll take it over there.
Michel Rutten (Feb 19 2018 at 09:22):
I've discussed this with Ewout a while ago. I'd prefer if each validation message provides a unique identifier/code and a list of (raw) parameter values. This will allow clients to render user friendly/localized messages.
Brian Postlethwaite (Feb 19 2018 at 09:58):
If this isn't standardized across all validators, what's the point?
Brian Postlethwaite (Feb 19 2018 at 09:58):
I don't disagree, but the default message should be user friendly to me...
Brian Postlethwaite (Feb 19 2018 at 09:59):
Anyone mind if I take a stab at making things more easily customized?
Grahame Grieve (Feb 19 2018 at 10:00):
this is not a short list. There's a lot of error messages with variations.
Grahame Grieve (Feb 19 2018 at 10:00):
but if we're going to do this, language translations should be important
Last updated: Apr 12 2022 at 19:14 UTC