mirror of
https://github.com/grassrootseconomics/farmstar-survey-ui.git
synced 2025-10-16 19:12:08 +02:00
30 lines
647 B
JavaScript
30 lines
647 B
JavaScript
import en from '@vueform/vueform/locales/en'
|
|
import tailwind from '@vueform/vueform/themes/tailwind'
|
|
|
|
import { Validator } from '@vueform/vueform'
|
|
|
|
const phoneRule = class extends Validator {
|
|
get message() {
|
|
return 'The What is your primary phone number? filed requires a valid phone number'
|
|
}
|
|
|
|
check(value) {
|
|
return /^(07|01)(\d){8}$/.test(value);
|
|
}
|
|
};
|
|
|
|
export default {
|
|
theme: tailwind,
|
|
locales: { en },
|
|
locale: 'en',
|
|
floatPlaceholders: false,
|
|
rules: {
|
|
phone: phoneRule,
|
|
},
|
|
endpoints: {
|
|
registration: {
|
|
url: 'https://webhook.site/af68d53b-063e-4588-a1ae-e49bc8cf5167',
|
|
method: 'post'
|
|
}
|
|
}
|
|
} |