Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikramthyagarajan/node-url-validation
Provides URL validation in a restify/express/connect application
https://github.com/vikramthyagarajan/node-url-validation
Last synced: 21 days ago
JSON representation
Provides URL validation in a restify/express/connect application
- Host: GitHub
- URL: https://github.com/vikramthyagarajan/node-url-validation
- Owner: vikramthyagarajan
- License: mit
- Created: 2014-10-21T08:44:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-21T09:24:51.000Z (about 10 years ago)
- Last Synced: 2024-10-11T12:13:07.882Z (about 1 month ago)
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-url-validation
===================Provides simple URL validation in a restify/express/connect application. There are 3 types of validation, and each works differently-
- Query Validation
Here, there are a set of allowed fields and subfields. When stuff is set otherwise, a validation error is sent out. Also, if no fields are set, then a default value is set. This is for url which can provide data depending on what fields are required by the user. Mostly, just GET calls.
Other Validations like for pagination also come under this. Access tokens and other authorization tasks are not taken care of by this module.- Body Validation
This is to check the body of the request sent. Mostly to be used in POST and PUT calls to make sure that the client is sending correct Data. Here, the allowed fields are set, and the required fields. The type of each field can either be explicitly specified, or a mongoose schema can be given, and validation occurs automatically based on the schema.- Params Validation
This is to check the URL of the request. Incase there are parameters, then validation can be done against those parameters.