check form before post