chrisly-bear / PEBRApp

The mobile app for the PEBRA trial in rural Lesotho.
https://pebra.info
MIT License
6 stars 1 forks source link

Input Field Types & Validation #14

Closed chrisly-bear closed 5 years ago

chrisly-bear commented 5 years ago

Input Field Types

Make sure all input fields have the right type.

E.g.

Input Field Validation

Make sure all fields are validated for correctness before being stored in the database.

E.g.

Update 14.06.2019:

The following inputs should be checked for correctness:

chrisly-bear commented 5 years ago

For input validation we can use the TextFormField's inputFormatters, e.g.:

inputFormatters: [
  WhitelistingTextInputFormatter(RegExp('[a-z0-9]')), // change the regex to something sensible
  LengthLimitingTextInputFormatter(12),
]
chrisly-bear commented 5 years ago

Closed with #50.