validate option value.