Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
const { Schema, model } = require('mongoose'); | |
// Answer Schema | |
const answerSchema = Schema({ | |
answer: { | |
type: String, | |
required: true | |
}, | |
correct: { | |
type: Boolean, |
<style> | |
input[type="file"]{ | |
position: absolute; | |
top: -500px; | |
} | |
div.file-listing{ | |
width: 200px; | |
} |
<template> | |
</template> | |
<script> | |
export default { | |
} | |
</script> |
<template> | |
<div class="row"> | |
<div class="offset-md-3 col-md-6 mt-5"> | |
<h3>Article Form</h3> | |
<form action="#" @submit.prevent="submitData"> | |
<div class="form-group"> | |
<input | |
type="text" | |
class="form-control" | |
placeholder="Title" |
<script> | |
export default { | |
name: "ArticleForm", | |
data() { | |
return { | |
article: { | |
title: "", | |
description: "" | |
} | |
}; |
</script> | |
<style scoped> | |
.errors { | |
color: red; | |
} | |
</style> |
"dependencies": { | |
"vue": "~2.6.12", | |
"yup": "^0.32.9" | |
}, |
npm install yup |
<script> | |
import * as Yup from "yup"; | |
const ArticleSchema = Yup.object().shape({ | |
title: Yup.string() | |
.min(10, "Title should be less than 10 characters") | |
.max(100, "Title should not exceed 100 characters") | |
.required("Title is required"), | |
description: Yup.string() | |
.min(50, "Description should be less than 50 characters") |