I'd like to make a question <form>
with autosaving similar to this one on Stackoverflow. I understand that unobtrusive autosaving can we done with setInterval()
and $.ajax()
(ref.1 ref.2) but I'm more interested in the form validation Stackoverflow uses to determine whether or not the form submits after a given interval of time.
My question is, should I just keep the validation simple and make sure the user has inputed, say more than 5 characters (or that more than 5 characters have changed)? What else should I be thinking about for the form validation specifically in the case of autosaving (or in contrast with user-initiated submit()
).