show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('./index') | |
, TempSchema = new mongoose.Schema({ | |
salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
}); | |
var Temp = mongoose.model('Temp', TempSchema); | |
console.log(Temp.schema.path('salutation').enumValues); | |
var temp = new Temp(); | |
console.log(temp.schema.path('salutation').enumValues); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add custom attribute on the input element or wrapper div data-valid={`${error ? "false" : "true"}} | |
import { useEffect } from 'react'; | |
import { useFormikContext } from 'formik'; | |
const FocusError = () => { | |
const { errors, isSubmitting, isValidating } = useFormikContext(); | |
useEffect(() => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import Box from '@mui/material/Box'; | |
import Stepper from '@mui/material/Stepper'; | |
import Step from '@mui/material/Step'; | |
import StepLabel from '@mui/material/StepLabel'; | |
import Button from '@mui/material/Button'; | |
import Typography from '@mui/material/Typography'; | |
import { styled } from '@mui/material/styles'; | |
import StepConnector, { | |
stepConnectorClasses, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require("aws-sdk"); | |
const { MongoClient } = require("mongodb"); | |
const dotenv = require("dotenv"); | |
dotenv.config(); | |
const s3 = new AWS.S3({ | |
region: "us-west-2", | |
}); |