use custom validate method for format check.