add else part for validation.

add else part for validation.