Creating custom fields and validation