Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-auto-api.validation

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-auto-api.validation - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

package.json
{
"name": "mongoose-auto-api.validation",
"version": "0.0.4",
"version": "0.0.5",
"description": "Automatic Mongoose REST API - Validations module",

@@ -5,0 +5,0 @@ "main": "./js/index.js",

@@ -16,1 +16,36 @@ # Mongoose Auto API - Validations Module

```
## Methods
* All methods return object
* messages (Array)
* list of error messages
* codes (Array)
* list of error codes
* valid (Boolean)
* returns true if valid input, false otherwise
* **userVal(text, field)**
* text (String) - text to validate
* field (String) - field name for error messages/codes generation
* Assures input is not empty, longer than 8 characters, and is a valid email
* **passVal(text, field)**
* text (String) - text to validate
* field (String) - field name for error messages/codes generation
* Assures input is not empty, longer than 8 characters, and is a valid password with at least one lowercase, capital, numeric, and special character
* **confirmPassVal(text, password, field)**
* text (String) - text to validate
* password (String) - confirmation text to check for match
* field (String) - field name for error messages/codes generation
* Assures input is not empty, and that input and confirmation password match
* **requiredVal(text, field)**
* text (String) - text to validate
* field (String) - field name for error messages/codes generation
* Assures input is not empty
* **lengthVal(text, field)**
* text (String) - text to validate
* field (String) - field name for error messages/codes generation
* length (Number) - minimum text length
* Assures input length is greater than or equal to *length*
* **joinValidations(vals)**
* vals (Array) - list of validation objects
* returns joined validation object with all messages, and error codes
* if any validations are false, *valid* will return false
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc