Hi I've a problem I need to validate my form values at api before to save data to the databasehttps://i.redd.it/hz6s38clsan21.jpgI have a from like thisconst postSchema = mongoose.Schema({ name: { type: String, require: true }, lastname: { type: String, require: true }, il: { type: String, require: true }, ilce: { type: String, require: true }, }) here my mongoose schemaI already made form validation but I also need API validationmodulesvar express = require('express'); var path = require('path'); var bodyParser = require('body-parser'); const mongoose = require('mongoose')
Submitted March 20, 2019 at 04:11PM by teriologia
No comments:
Post a Comment