check value before submit form