better field checking before submit