Field validation and remove sql calculations