fix validate when value undefined