PageSourceSearch

https://www.snippfy.ai/assets/form-validation-D3W2saiB.js

js snippfy.ai collected 2026-10-05 14:06:49 UTC 24,161 bytes, 636 lines download raw bytes

1import{r as u,b as O,i as D,a as Y,c as x,l as $,p as S,d as j,f as I,e as R,u as J}from"./validators-DpYrMFzk.js";import{r as d,o as g,f as P,e as o,b as l,m as e,aM as V,a3 as N,t as y,b2 as U,d as L}from"./index-BJiotQ1y.js";import{_ as B}from"./AppTextField-x1ahq4oL.js";import{V as A}from"./VRow-BaWP5n9q.js";import{V as i}from"./VCol-Bwtue8I5.js";import{V as E}from"./VForm-CFTmWfH7.js";import{_ as z}from"./AppCardCode-CcXt1CXD.js";import"./helpers-DK5QwNv0.js";import"./form-8aC4oU02.js";import"./VTextField-BNgtobe3.js";/* empty css                   */import"./VCounter-BL1LRJqH.js";import"./VImg-CEdg-vTA.js";import"./VField-KxcDY4Jk.js";import"./easing-CjukEv2V.js";import"./VInput-CGjPsSv0.js";import"./forwardRefs-C-GTDzx5.js";/* empty css              */import"./vue3-perfect-scrollbar-C2zm10Dz.js";import"./VCard-ImMJge73.js";import"./VAvatar-Bj_eSgFO.js";import"./VCardText-Ds77CzhY.js";import"./VDivider-niEB_qmK.js";const G={__name:"DemoFormValidationValidationTypes",setup(T){const w=d(""),c=d(""),F=d(""),p=d(""),m=d(""),f=d(""),h=d(""),s=d(""),n=d(""),v=d(""),b=d(""),q=d(""),k=d();return(r,a)=>{const C=B;return g(),P(e(E),{ref_key:"refForm",ref:k,onSubmit:a[13]||(a[13]=U(()=>{},["prevent"]))},{default:o(()=>[l(A,null,{default:o(()=>[l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(w),"onUpdate:modelValue":a[0]||(a[0]=t=>V(w)?w.value=t:null),"persistent-placeholder":"",placeholder:"This field is required",rules:["requiredValidator"in r?r.requiredValidator:e(u)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(c),"onUpdate:modelValue":a[1]||(a[1]=t=>V(c)?c.value=t:null),"persistent-placeholder":"",placeholder:"Enter Number between 10 & 20",rules:["requiredValidator"in r?r.requiredValidator:e(u),("betweenValidator"in r?r.betweenValidator:e(O))(e(c),10,20)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(F),"onUpdate:modelValue":a[2]||(a[2]=t=>V(F)?F.value=t:null),"persistent-placeholder":"",placeholder:"Must only consist of numbers",rules:["requiredValidator"in r?r.requiredValidator:e(u),"integerValidator"in r?r.integerValidator:e(D)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(p),"onUpdate:modelValue":a[3]||(a[3]=t=>V(p)?p.value=t:null),"persistent-placeholder":"",placeholder:"Must match the specified regular expression : ^([0-9]+)$ - numbers only",rules:["requiredValidator"in r?r.requiredValidator:e(u),("regexValidator"in r?r.regexValidator:e(Y))(e(p),"^([0-9]+)$")]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(m),"onUpdate:modelValue":a[4]||(a[4]=t=>V(m)?m.value=t:null),"persistent-placeholder":"",placeholder:"Only alphabetic characters",rules:["requiredValidator"in r?r.requiredValidator:e(u),"alphaValidator"in r?r.alphaValidator:e(x)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(f),"onUpdate:modelValue":a[5]||(a[5]=t=>V(f)?f.value=t:null),"persistent-placeholder":"",placeholder:"Length must be exactly 3 characters.",rules:["requiredValidator"in r?r.requiredValidator:e(u),("lengthValidator"in r?r.lengthValidator:e($))(e(f),3)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(h),"onUpdate:modelValue":a[6]||(a[6]=t=>V(h)?h.value=t:null),"persistent-placeholder":"",placeholder:"Password Input Field",type:"password",rules:["requiredValidator"in r?r.requiredValidator:e(u),"passwordValidator"in r?r.passwordValidator:e(S)],autocomplete:"on"},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(s),"onUpdate:modelValue":a[7]||(a[7]=t=>V(s)?s.value=t:null),"persistent-placeholder":"",placeholder:"The digits field must be numeric and exactly contain 3 digits",rules:["requiredValidator"in r?r.requiredValidator:e(u),("lengthValidator"in r?r.lengthValidator:e($))(e(s),3),"integerValidator"in r?r.integerValidator:e(D)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(n),"onUpdate:modelValue":a[8]||(a[8]=t=>V(n)?n.value=t:null),"persistent-placeholder":"",placeholder:"Repeat password must match",type:"password",rules:["requiredValidator"in r?r.requiredValidator:e(u),("confirmedValidator"in r?r.confirmedValidator:e(j))(e(n),e(h))],autocomplete:"on"},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(v),"onUpdate:modelValue":a[9]||(a[9]=t=>V(v)?v.value=t:null),"persistent-placeholder":"",placeholder:"Only alphabetic characters, numbers, dashes or underscores",rules:["requiredValidator"in r?r.requiredValidator:e(u),"alphaDashValidator"in r?r.alphaDashValidator:e(I)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(b),"onUpdate:modelValue":a[10]||(a[10]=t=>V(b)?b.value=t:null),"persistent-placeholder":"",placeholder:"Must be a valid email",rules:["requiredValidator"in r?r.requiredValidator:e(u),"emailValidator"in r?r.emailValidator:e(R)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(C,{modelValue:e(q),"onUpdate:modelValue":a[11]||(a[11]=t=>V(q)?q.value=t:null),"persistent-placeholder":"",placeholder:"Must be a valid url",rules:["requiredValidator"in r?r.requiredValidator:e(u),"urlValidator"in r?r.urlValidator:e(J)
1]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12"},{default:o(()=>[l(N,{type:"submit",onClick:a[12]||(a[12]=t=>{var M;return(M=e(k))==null?void 0:M.validate()})},{default:o(()=>a[14]||(a[14]=[y(" Submit ")])),_:1})]),_:1})]),_:1})]),_:1},512)}}},H={__name:"DemoFormValidationValidatingMultipleRules",setup(T){const w=d(),c=d(),F=d(),p=d(),m=d(),f=d(!1),h=d(!1);return(s,n)=>{const v=B;return g(),P(e(E),{ref_key:"refForm",ref:F,onSubmit:U(()=>{},["prevent"])},{default:o(()=>[l(A,null,{default:o(()=>[l(i,{cols:"12",md:"6"},{default:o(()=>[l(v,{modelValue:e(w),"onUpdate:modelValue":n[0]||(n[0]=b=>V(w)?w.value=b:null),label:"Name",placeholder:"Your Name",rules:["requiredValidator"in s?s.requiredValidator:e(u)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(v,{modelValue:e(c),"onUpdate:modelValue":n[1]||(n[1]=b=>V(c)?c.value=b:null),label:"Email",placeholder:"Your Email",rules:["requiredValidator"in s?s.requiredValidator:e(u),"emailValidator"in s?s.emailValidator:e(R)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(v,{modelValue:e(p),"onUpdate:modelValue":n[2]||(n[2]=b=>V(p)?p.value=b:null),label:"Password",type:e(f)?"text":"password","append-inner-icon":e(f)?"tabler-eye-off":"tabler-eye",placeholder:"Enter Password",rules:["requiredValidator"in s?s.requiredValidator:e(u),"passwordValidator"in s?s.passwordValidator:e(S)],autocomplete:"on","onClick:appendInner":n[3]||(n[3]=b=>f.value=!e(f))},null,8,["modelValue","type","append-inner-icon","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(v,{modelValue:e(m),"onUpdate:modelValue":n[4]||(n[4]=b=>V(m)?m.value=b:null),label:"Confirm Password",autocomplete:"confirm-password",type:e(h)?"text":"password",placeholder:"Confirm Password","append-inner-icon":e(m)?"tabler-eye-off":"tabler-eye",rules:["requiredValidator"in s?s.requiredValidator:e(u),("confirmedValidator"in s?s.confirmedValidator:e(j))(e(m),e(p))],"onClick:appendInner":n[5]||(n[5]=b=>h.value=!e(h))},null,8,["modelValue","type","append-inner-icon","rules"])]),_:1}),l(i,{cols:"12"},{default:o(()=>[l(N,{type:"submit",onClick:n[6]||(n[6]=b=>{var q;return(q=e(F))==null?void 0:q.validate()})},{default:o(()=>n[7]||(n[7]=[y(" Submit ")])),_:1})]),_:1})]),_:1})]),_:1},512)}}},K={__name:"DemoFormValidationSimpleFormValidation",setup(T){const w=d(""),c=d(""),F=d();return(p,m)=>{const f=B;return g(),P(e(E),{ref_key:"refForm",ref:F,onSubmit:U(()=>{},["prevent"])},{default:o(()=>[l(A,null,{default:o(()=>[l(i,{cols:"12",md:"6"},{default:o(()=>[l(f,{modelValue:e(w),"onUpdate:modelValue":m[0]||(m[0]=h=>V(w)?w.value=h:null),label:"First Name",placeholder:"John",rules:["requiredValidator"in p?p.requiredValidator:e(u)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12",md:"6"},{default:o(()=>[l(f,{modelValue:e(c),"onUpdate:modelValue":m[1]||(m[1]=h=>V(c)?c.value=h:null),label:"Email",placeholder:"[email protected]",rules:["requiredValidator"in p?p.requiredValidator:e(u),"emailValidator"in p?p.emailValidator:e(R)]},null,8,["modelValue","rules"])]),_:1}),l(i,{cols:"12"},{default:o(()=>[l(N,{type:"submit",onClick:m[2]||(m[2]=h=>{var s;return(s=e(F))==null?void 0:s.validate()})},{default:o(()=>m[3]||(m[3]=[y(" Submit ")])),_:1})]),_:1})]),_:1})]),_:1},512)}}},Q={ts:`<script lang="ts" setup>
2import { VForm } from 'vuetify/components/VForm'
3
4const firstName = ref('')
5const email = ref('')
6
7const refForm = ref<VForm>()
8<\/script>
9
10<template>
11  <VForm
12    ref="refForm"
13    @submit.prevent="() => {}"
14  >
15    <VRow>
16      <VCol
17        cols="12"
18        md="6"
19      >
20        <AppTextField
21          v-model="firstName"
22          label="First Name"
23          placeholder="John"
24          :rules="[requiredValidator]"
25        />
26      </VCol>
27
28      <VCol
29        cols="12"
30        md="6"
31      >
32        <AppTextField
33          v-model="email"
34          label="Email"
35          placeholder="[email protected]"
36          :rules="[requiredValidator, emailValidator]"
37        />
38      </VCol>
39
40      <VCol cols="12">
41        <VBtn
42          type="submit"
43          @click="refForm?.validate()"
44        >
45          Submit
46        </VBtn>
47      </VCol>
48    </VRow>
49  </VForm>
50</template>
51`,js:`<script setup>
52import { VForm } from 'vuetify/components/VForm'
53
54const firstName = ref('')
55const email = ref('')
56const refForm = ref()
57<\/script>
58
59<template>
60  <VForm
61    ref="refForm"
62    @submit.prevent="() => {}"
63  >
64    <VRow>
65      <VCol
66        cols="12"
67        md="6"
68      >
69        <AppTextField
70          v-model="firstName"
71          label="First Name"
72          placeholder="John"
73          :rules="[requiredValidator]"
74        />
75      </VCol>
76
77      <VCol
78        cols="12"
79        md="6"
80      >
81        <AppTextField
82          v-model="email"
83          label="Email"
84          placeholder="[email protected]"
85          :rules="[requiredValidator, emailValidator]"
86        />
87      </VCol>
88
89      <VCol cols="12">
90        <VBtn
91          type="submit"
92          @click="refForm?.validate()"
93        >
94          Submit
95        </VBtn>
96      </VCol>
97    </VRow>
98  </VForm>
99</template>
100`},W={ts:`<script lang="ts" setup>
101import { VForm } from 'vuetify/components/VForm'
102
103const name = ref()
104const email = ref()
105const refForm = ref<VForm>()
106const password = ref()
107const confirmPassword = ref()
108const isPasswordVisible = ref(false)
109const isConfirmPasswordVisible = ref(false)
110<\/script>
111
112<template>
113  <VForm
114    ref="refForm"
115    @submit.prevent="() => {}"
116  >
117    <VRow>
118      <VCol
119        cols="12"
120        md="6"
121      >
122        <AppTextField
123          v-model="name"
124          label="Name"
125          placeholder="Your Name"
126          :rules="[requiredValidator]"
127        />
128      </VCol>
129
130      <VCol
131        cols="12"
132        md="6"
133      >
134        <AppTextField
135          v-model="email"
136          label="Email"
137          placeholder="Your Email"
138          :rules="[requiredValidator, emailValidator]"
139        />
140      </VCol>
141
142      <VCol
143        cols="12"
144        md="6"
145      >
146        <AppTextField
147          v-model="password"
148          label="Password"
149          :type="isPasswordVisible ? 'text' : 'password'"
150          :append-inner-icon="isPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
151          placeholder="Enter Password"
152          :rules="[requiredValidator, passwordValidator]"
153          autocomplete="on"
154          @click:append-inner="isPasswordVisible = !isPasswordVisible"
155        />
156      </VCol>
157
158      <VCol
159        cols="12"
160        md="6"
161      >
162        <AppTextField
163          v-model="confirmPassword"
164          label="Confirm Password"
165          autocomplete="confirm-password"
166          :type="isConfirmPasswordVisible ? 'text' : 'password'"
167          placeholder="Confirm Password"
168          :append-inner-icon="confirmPassword ? 'tabler-eye-off' : 'tabler-eye'"
169          :rules="[requiredValidator, confirmedValidator(confirmPassword, password)]"
170          @click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
171        />
172      </VCol>
173
174      <VCol cols="12">
175        <VBtn
176          type="submit"
177          @click="refForm?.validate()"
178        >
179          Submit
180        </VBtn>
181      </VCol>
182    </VRow>
183  </VForm>
184</template>
185`,js:`<script setup>
186import { VForm } from 'vuetify/components/VForm'
187
188const name = ref()
189const email = ref()
190const refForm = ref()
191const password = ref()
192const confirmPassword = ref()
193const isPasswordVisible = ref(false)
194const isConfirmPasswordVisible = ref(false)
195<\/script>
196
197<template>
198  <VForm
199    ref="refForm"
200    @submit.prevent="() => {}"
201  >
202    <VRow>
203      <VCol
204        cols="12"
205        md="6"
206      >
207        <AppTextField
208          v-model="name"
209          label="Name"
210          placeholder="Your Name"
211          :rules="[requiredValidator]"
212        />
213      </VCol>
214
215      <VCol
216        cols="12"
217        md="6"
218      >
219        <AppTextField
220          v-model="email"
221          label="Email"
222          placeholder="Your Email"
223          :rules="[requiredValidator, emailValidator]"
224        />
225      </VCol>
226
227      <VCol
228        cols="12"
229        md="6"
230      >
231        <AppTextField
232          v-model="password"
233          label="Password"
234          :type="isPasswordVisible ? 'text' : 'password'"
235          :append-inner-icon="isPasswordVisible ? 'tabler-eye-off' : 'tabler-eye'"
236          placeholder="Enter Password"
237          :rules="[requiredValidator, passwordValidator]"
238          autocomplete="on"
239          @click:append-inner="isPasswordVisible = !isPasswordVisible"
240        />
241      </VCol>
242
243      <VCol
244        cols="12"
245        md="6"
246      >
247        <AppTextField
248          v-model="confirmPassword"
249          label="Confirm Password"
250          autocomplete="confirm-password"
251          :type="isConfirmPasswordVisible ? 'text' : 'password'"
252          placeholder="Confirm Password"
253          :append-inner-icon="confirmPassword ? 'tabler-eye-off' : 'tabler-eye'"
254          :rules="[requiredValidator, confirmedValidator(confirmPassword, password)]"
255          @click:append-inner="isConfirmPasswordVisible = !isConfirmPasswordVisible"
256        />
257      </VCol>
258
259      <VCol cols="12">
260        <VBtn
261          type="submit"
262          @click="refForm?.validate()"
263        >
264          Submit
265        </VBtn>
266      </VCol>
267    </VRow>
268  </VForm>
269</template>
270`},X={ts:`<script lang="ts" setup>
271import { VForm } from 'vuetify/components/VForm'
272
273const requiredField = ref('')
274const numberBetween10to20 = ref('')
275const onlyConsistNumber = ref('')
276const matchRegularEx = ref('')
277const onlyAlphabeticCharacters = ref('')
278const specifiedLength = ref('')
279const password = ref('')
280const digits = ref('')
281const repeatPassword = ref('')
282const onlyAlphabeticNumbersDashesUnderscores = ref('')
283const email = ref('')
284const validURL = ref('')
285const refForm = ref<VForm>()
286<\/script>
287
288<template>
289  <VForm
290    ref="refForm"
291    @submit.prevent
292  >
293    <VRow>
294      <VCol
295        cols="12"
296        md="6"
297      >
298        <AppTextField
299          v-model="requiredField"
300          persistent-placeholder
301          placeholder="This field is required"
302          :rules="[requiredValidator]"
303        />
304      </VCol>
305
306      <VCol
307        cols="12"
308        md="6"
309      >
310        <AppTextField
311          v-model="numberBetween10to20"
312          persistent-placeholder
313          placeholder="Enter Number between 10 & 20"
314          :rules="[requiredValidator, betweenValidator(numberBetween10to20, 10, 20)]"
315        />
316      </VCol>
317
318      <VCol
319        cols="12"
320        md="6"
321      >
322        <AppTextField
323          v-model="onlyConsistNumber"
324          persistent-placeholder
325          placeholder="Must only consist of numbers"
326          :rules="[requiredValidator, integerValidator]"
327        />
328      </VCol>
329
330      <VCol
331        cols="12"
332        md="6"
333      >
334        <AppTextField
335          v-model="matchRegularEx"
336          persistent-placeholder
337          placeholder="Must match the specified regular expression : ^([0-9]+)$ - numbers only"
338          :rules="[requiredValidator, regexValidator(matchRegularEx, '^([0-9]+)$')]"
339        />
340      </VCol>
341
342      <VCol
343        cols="12"
344        md="6"
345      >
346        <AppTextField
347          v-model="onlyAlphabeticCharacters"
348          persistent-placeholder
349          placeholder="Only alphabetic characters"
350          :rules="[requiredValidator, alphaValidator]"
351        />
352      </VCol>
353
354      <VCol
355        cols="12"
356        md="6"
357      >
358        <AppTextField
359          v-model="specifiedLength"
360          persistent-placeholder
361          placeholder="Length must be exactly 3 characters."
362          :rules="[requiredValidator, lengthValidator(specifiedLength, 3)]"
363        />
364      </VCol>
365
366      <VCol
367        cols="12"
368        md="6"
369      >
370        <AppTextField
371          v-model="password"
372          persistent-placeholder
373          placeholder="Password Input Field"
374          type="password"
375          :rules="[requiredValidator, passwordValidator]"
376          autocomplete="on"
377        />
378      </VCol>
379
380      <VCol
381        cols="12"
382        md="6"
383      >
384        <AppTextField
385          v-model="digits"
386          persistent-placeholder
387          placeholder="The digits field must be numeric and exactly contain 3 digits"
388          :rules="[requiredValidator, lengthValidator(digits, 3), integerValidator]"
389        />
390      </VCol>
391
392      <VCol
393        cols="12"
394        md="6"
395      >
396        <AppTextField
397          v-model="repeatPassword"
398          persistent-placeholder
399          placeholder="Repeat password must match"
400          type="password"
401          :rules="[requiredValidator, confirmedValidator(repeatPassword, password)]"
402          autocomplete="on"
403        />
404      </VCol>
405
406      <VCol
407        cols="12"
408        md="6"
409      >
410        <AppTextField
411          v-model="onlyAlphabeticNumbersDashesUnderscores"
412          persistent-placeholder
413          placeholder="Only alphabetic characters, numbers, dashes or underscores"
414          :rules="[requiredValidator, alphaDashValidator]"
415        />
416      </VCol>
417
418      <VCol
419        cols="12"
420        md="6"
421      >
422        <AppTextField
423          v-model="email"
424          persistent-placeholder
425          placeholder="Must be a valid email"
426          :rules="[requiredValidator, emailValidator]"
427        />
428      </VCol>
429
430      <VCol
431        cols="12"
432        md="6"
433      >
434        <AppTextField
435          v-model="validURL"
436          persistent-placeholder
437          placeholder="Must be a valid url"
438          :rules="[requiredValidator, urlValidator]"
439        />
440      </VCol>
441
442      <VCol cols="12">
443        <VBtn
444          type="submit"
445          @click="refForm?.validate()"
446        >
447          Submit
448        </VBtn>
449      </VCol>
450    </VRow>
451  </VForm>
452</template>
453`,js:`<script setup>
454import { VForm } from 'vuetify/components/VForm'
455
456const requiredField = ref('')
457const numberBetween10to20 = ref('')
458const onlyConsistNumber = ref('')
459const matchRegularEx = ref('')
460const onlyAlphabeticCharacters = ref('')
461const specifiedLength = ref('')
462const password = ref('')
463const digits = ref('')
464const repeatPassword = ref('')
465const onlyAlphabeticNumbersDashesUnderscores = ref('')
466const email = ref('')
467const validURL = ref('')
468const refForm = ref()
469<\/script>
470
471<template>
472  <VForm
473    ref="refForm"
474    @submit.prevent
475  >
476    <VRow>
477      <VCol
478        cols="12"
479        md="6"
480      >
481        <AppTextField
482          v-model="requiredField"
483          persistent-placeholder
484          placeholder="This field is required"
485          :rules="[requiredValidator]"
486        />
487      </VCol>
488
489      <VCol
490        cols="12"
491        md="6"
492      >
493        <AppTextField
494          v-model="numberBetween10to20"
495          persistent-placeholder
496          placeholder="Enter Number between 10 & 20"
497          :rules="[requiredValidator, betweenValidator(numberBetween10to20, 10, 20)]"
498        />
499      </VCol>
500
501      <VCol
502        cols="12"
503        md="6"
504      >
505        <AppTextField
506          v-model="onlyConsistNumber"
507          persistent-placeholder
508          placeholder="Must only consist of numbers"
509          :rules="[requiredValidator, integerValidator]"
510        />
511      </VCol>
512
513      <VCol
514        cols="12"
515        md="6"
516      >
517        <AppTextField
518          v-model="matchRegularEx"
519          persistent-placeholder
520          placeholder="Must match the specified regular expression : ^([0-9]+)$ - numbers only"
521          :rules="[requiredValidator, regexValidator(matchRegularEx, '^([0-9]+)$')]"
522        />
523      </VCol>
524
525      <VCol
526        cols="12"
527        md="6"
528      >
529        <AppTextField
530          v-model="onlyAlphabeticCharacters"
531          persistent-placeholder
532          placeholder="Only alphabetic characters"
533          :rules="[requiredValidator, alphaValidator]"
534        />
535      </VCol>
536
537      <VCol
538        cols="12"
539        md="6"
540      >
541        <AppTextField
542          v-model="specifiedLength"
543          persistent-placeholder
544          placeholder="Length must be exactly 3 characters."
545          :rules="[requiredValidator, lengthValidator(specifiedLength, 3)]"
546        />
547      </VCol>
548
549      <VCol
550        cols="12"
551        md="6"
552      >
553        <AppTextField
554          v-model="password"
555          persistent-placeholder
556          placeholder="Password Input Field"
557          type="password"
558          :rules="[requiredValidator, passwordValidator]"
559          autocomplete="on"
560        />
561      </VCol>
562
563      <VCol
564        cols="12"
565        md="6"
566      >
567        <AppTextField
568          v-model="digits"
569          persistent-placeholder
570          placeholder="The digits field must be numeric and exactly contain 3 digits"
571          :rules="[requiredValidator, lengthValidator(digits, 3), integerValidator]"
572        />
573      </VCol>
574
575      <VCol
576        cols="12"
577        md="6"
578      >
579        <AppTextField
580          v-model="repeatPassword"
581          persistent-placeholder
582          placeholder="Repeat password must match"
583          type="password"
584          :rules="[requiredValidator, confirmedValidator(repeatPassword, password)]"
585          autocomplete="on"
586        />
587      </VCol>
588
589      <VCol
590        cols="12"
591        md="6"
592      >
593        <AppTextField
594          v-model="onlyAlphabeticNumbersDashesUnderscores"
595          persistent-placeholder
596          placeholder="Only alphabetic characters, numbers, dashes or underscores"
597          :rules="[requiredValidator, alphaDashValidator]"
598        />
599      </VCol>
600
601      <VCol
602        cols="12"
603        md="6"
604      >
605        <AppTextField
606          v-model="email"
607          persistent-placeholder
608          placeholder="Must be a valid email"
609          :rules="[requiredValidator, emailValidator]"
610        />
611      </VCol>
612
613      <VCol
614        cols="12"
615        md="6"
616      >
617        <AppTextField
618          v-model="validURL"
619          persistent-placeholder
620          placeholder="Must be a valid url"
621          :rules="[requiredValidator, urlValidator]"
622        />
623      </VCol>
624
625      <VCol cols="12">
626        <VBtn
627          type="submit"
628          @click="refForm?.validate()"
629        >
630          Submit
631        </VBtn>
632      </VCol>
633    </VRow>
634  </VForm>
635</template>
636`},ve={__name:"form-validation",setup(T){return(w,c)=>{const F=K,p=z,m=H,f=G;return g(),P(A,null,{default:o(()=>[l(i,{cols:"12"},{default:o(()=>[l(p,{title:"Simple Form Validation",code:Q},{default:o(()=>[c[0]||(c[0]=L("p",null,[y("Use "),L("code",null,"Rules"),y(" prop to validate the input.")],-1)),l(F)]),_:1},8,["code"])]),_:1}),l(i,{cols:"12"},{default:o(()=>[l(p,{title:"Validating Multiple Rules",code:W},{default:o(()=>[l(m)]),_:1},8,["code"])]),_:1}),l(i,{cols:"12"},{default:o(()=>[l(p,{title:"Validation Types",code:X},{default:o(()=>[l(f)]),_:1},8,["code"])]),_:1})]),_:1})}}};export{ve as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.