Add required check for empty string

If the field is empty string, it should be invalid.