rcc-uchicago / submit

Simple web service for submitting file uploads and associated metadata.
0 stars 4 forks source link

Use joi for validation #4

Open joyrexus opened 9 years ago

joyrexus commented 9 years ago

Use joi to validate submitted file and form data. Basics are covered in this tutorial.

For example, ensure that submitted name fields only contain non-numeric strings and that uploaded files only contain non-negative integers in the third column.

joyrexus commented 9 years ago

Heads-up to @moniker001:

Apropos of joi and form validation ...

I'm wondering if we can use joi in conjunction with caolan/forms. I like the idea of being able to easily customize the front-end forms (and their validation logic) for a new project. I want to be able to clone the baseline client and add new fields/validators as appropriate for the project.

@joyrexus will look into this.