The POSApp at this stage illustrates how we can use the MVVM pattern to capture user interaction. In this implementation, it doesn’t perform any checks on data entered by the users. For example, users could enter a negative number or even a character in the quantity field. This will generate an error and will block the application. This chapter explains how we can deal with this situation.
Checking Inputs
This section shows how to check the user-entered data against three validation rules: users must select an item before they press the Add button, the quantity field must not be empty, and the quantity must be a non-zero ...