Closed dgp1130 closed 8 years ago
Added basic validation to the server, so it will call back with an error when it fails to validate. The user can use this with Express to trigger one function on successful validation and another on failed validation.
@sawyernovak, I updated a lot of the configuration with this to add support for server-side ES6 code and testing. Server side code now compiles from "src/validator" to "src/validator.es5" since it doesn't make sense to put it in "build/uniform.js" which is intended for clients (same for server-side test suites and helpers). I also updated WebStorm's transpilers for this, so make sure yours are updated. You can also use npm run build
to force everything to update the first time.
Since we are now able to run a script and determine its validity against data stored in the browser's DOM, we should set up the server to validate against data sent in the HTTP request. Our biggest mistake last time was to doing this very late in the development process, so we should do this as soon as possible and make sure that it is kept up to date with any changes to the client.