Added the Ajax for demo (with server-side validations).