the common checking of form