Add character validate and max or min validate.

Signed-off-by: servanter <fengshang@126.com>