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

fixes #1478 
Suggest a semi colon in the end of this line and have `var rec = ...` in the next.