Updated validate submit

custom validation can be either ajax calls that return a promise, or
just functions that return true or false.