validation now works for both input forms