"Price each" field should have better sanitisation
under review
D
Daniel Noll
Examples of things you're not allowed to enter into "Price each":
Example 1: "3727 "
String has one space at the end. Screenshot shows the behaviour when you do it - the error message is also incorrect.
This is silly because, in a good application, _all_ text fields should be trimmed before the value is interpreted. It's such a well known good practice, that in good app _frameworks_, text fields tend to do this for you by default so the app doesn't have to. I have no idea what framework Blackship is using here, but from its behaviour, we know that it isn't very good.
Example 2: "3,727"
This example is silly because:
1. To fill out the customs declaration, I usually want to copy the prices from the actual invoice, because manually typing them in takes longer. But this is the standard formatting for numbers, so rejecting it breaks the ability to copy/paste from invoices.
2. Blackship _themselves_ format prices in exactly the same way, in the customs declaration list. So it's doubly stupid, because Blackship is rejecting the number as a number, while at the same time preferring to format its own numbers like this. There's an old saying which goes: "if you dish it out you have to be able to take it", which applies to data validations and protocols just as much as it applies to everyday life.
Chloe Bergqvist
under review