Use TextField with validator instead of custom field.