One option is to use a regex to check the format.
\d+(.\d{1,2})?
is one possible regex you could use. A search of the web will reveal other possibilities that may be more suited to your specific need.
That said, are you sure you want/need to do this “in the middle?” If the module is simply passing this value on to some system, why not let that system detect/enforce the format instead of doing it in middleware?
If you’re going to “fix” the value, be careful. Should you round? Truncate? Round up, down, half-up, etc.? People will forget that the middleware is explicitly modifying the data and you’ll end up with production support tickets about the data being “corrupted.”
#webMethods#Integration-Server-and-ESB#webMethods-General