Validating input data in flash