Refactor examples in forms.md
Closed this issue · 2 comments
BenGitsCode commented
The object returned can be used to validate the form data.
in api.js
```js
'use strict';
const ajaxDefaults = {
- url: 'http://localhost:3000',
+ - url: 'http://localhost:7165',
};
const myRequest = (data, success, fail) => {
$.ajax(Object.assign({ method: 'POST', data }, ajaxDefaults))
.done(success)
.fail(fail);
};
module.exports = {
myRequest,
};
gaand commented
☝️ is not how the browser template is used anymore.
Jcornmanhomonoff commented
@gaand says closing as obsolete
form validation here: https://git.generalassemb.ly/ga-wdi-boston/jquery-ajax-patch/issues/24