O'Reilly logo

MVVM in Delphi: Architecting and Building Model View ViewModel Applications by John Kouraklis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

© John Kouraklis 2016

John Kouraklis, MVVM in Delphi, 10.1007/978-1-4842-2214-0_7

7. Input Validation

John Kouraklis

(1)London, UK

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required