Adding field validation, same functionality as database validation