add form $invalid support

i just add the form $invalid support