validate before insertion, prepare for server-side insertion