chore: use monorepo organization
This commit is contained in:
parent
deaf7d6ecc
commit
a687827f7e
1099 changed files with 8184 additions and 11535 deletions
50
packages/admin-ui/src/pages/Services/schemas/mailgun.js
Normal file
50
packages/admin-ui/src/pages/Services/schemas/mailgun.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import TextInputFormik from 'src/components/inputs/formik/TextInput'
|
||||
import * as Yup from 'yup'
|
||||
|
||||
export default {
|
||||
code: 'mailgun',
|
||||
name: 'Mailgun',
|
||||
title: 'Mailgun (Email)',
|
||||
elements: [
|
||||
{
|
||||
code: 'apiKey',
|
||||
display: 'API key',
|
||||
component: TextInputFormik
|
||||
},
|
||||
{
|
||||
code: 'domain',
|
||||
display: 'Domain',
|
||||
component: TextInputFormik
|
||||
},
|
||||
{
|
||||
code: 'fromEmail',
|
||||
display: 'From email',
|
||||
component: TextInputFormik,
|
||||
face: true
|
||||
},
|
||||
{
|
||||
code: 'toEmail',
|
||||
display: 'To email',
|
||||
component: TextInputFormik,
|
||||
face: true
|
||||
}
|
||||
],
|
||||
getValidationSchema: () => {
|
||||
return Yup.object().shape({
|
||||
apiKey: Yup.string('The API key must be a string')
|
||||
.max(100, 'The API key is too long')
|
||||
.required('The API key is required'),
|
||||
domain: Yup.string('The domain must be a string')
|
||||
.max(100, 'The domain is too long')
|
||||
.required('The domain is required'),
|
||||
fromEmail: Yup.string('The from email must be a string')
|
||||
.max(100, 'The from email is too long')
|
||||
.email('The from email must be a valid email address')
|
||||
.required('The from email is required'),
|
||||
toEmail: Yup.string('The to email must be a string')
|
||||
.max(100, 'The to email is too long')
|
||||
.email('The to email must be a valid email address')
|
||||
.required('The to email is required')
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue