Fixes #1478. Adds validation to field. Values must be in the store

fixes #1478 
Curly brackets around if missing.