PageSourceSearch

https://app.instead.com/_nuxt/aQBBQk1O.js

js instead.com collected 2026-09-26 15:48:36 UTC 5,107 bytes, 1 lines download raw bytes

1import{d as C,k as T,b as k,c as A,g as p,G as R,c3 as m,f as o,e as S,H as i,t as d,r as n,c4 as $}from"#entry";import{_ as E}from"./y8IV7HO8.js";const O={class:"flex flex-col space-y-12"},j={class:"rounded-lg border-2 border-red-200 bg-red-50 p-6"},N={class:"space-y-4"},_={class:"rounded bg-gray-100 p-4"},F={class:"space-y-2 text-sm"},q=C({__name:"inputPassword",setup(B){const u=n(""),c=n({}),l=$({Password:""}),r=n(null),v=n([]),f=T().required("Password is required").min(16,"Password must be at least 16 characters").matches(/[A-Z]/,"Password must contain at least one uppercase letter").matches(/[a-z]/,"Password must contain at least one lowercase letter").matches(/[0-9]/,"Password must contain at least one number").matches(/[!@#$%^&*(),.?":{}|<>]/,'Password must contain at least 1 special character: !@#$%^&*(),.?":{}|<>');function w(){console.log("Change event triggered:",u.value)}async function b(){console.log("🧪 Testing password validation via template ref..."),console.log("📋 Current form state:",{Password:l.Password}),console.log("📏 Password length:",(l.Password||"").length);try{const t=c.value.Password;if(console.log("🔍 Template ref object:",t),!t){console.error("❌ Template ref is undefined!"),r.value={error:"Template ref is undefined"};return}console.log("🎯 Available methods on ref:",Object.keys(t)),console.log("📊 Ref properties:",t),console.log("🔍 Checking ref.value:",t.value),console.log("🔍 Checking ref.modelValue:",t.modelValue),console.log("🔍 Checking ref.$el:",t.$el),console.log("🚀 Calling validate() method...");const e=await t.validate();console.log("📝 Validation result:",e),r.value=e,console.log("🎯 Expected: validity.value should contain current form value"),console.log("🎯 Actual: validity.value =",e?.value),console.log("🎯 Expected: validity.valid should reflect validation state"),console.log("🎯 Actual: validity.valid =",e?.valid),console.log("🎯 Expected: validity.errors should contain validation errors if invalid"),console.log("🎯 Actual: validity.errors =",e?.errors)}catch(t){console.error("❌ Error during validation test:",t),r.value={error:t.message}}}function y(){console.log("🔍 Logging password template ref contents...");const t=c.value.Password;if(!t){console.error("❌ Template ref is undefined!");return}console.log("📋 Template ref object:",t),console.log("🎯 Available methods/properties:");const e=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertyNames(Object.getPrototypeOf(t))),s=Array.from(new Set(e)).filter(a=>a!=="constructor");v.value=s,s.forEach(a=>{try{const g=t[a];console.log(`  - ${a}:`,typeof g,g)}catch{console.log(`  - ${a}: [Error accessing]`)}})}function h(){l.Password="",console.log("🧹 Form cleared")}function x(){l.Password="Password123",console.log("✏️ Test value set:",l.Password)}function P(){l.Password="short",console.log("✏️ Short value set (should be invalid):",l.Password)}const V=n({title:"Password input",binding:{type:"password",label:"Password",autocomplete:"current-password"}});return(t,e)=>(k(),A("div",O,[p(E,{binding:V.value,"max-width":"max-w-2xl"},{default:R(s=>[p(m,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=a=>u.value=a),type:s.binding.type,label:s.binding.label,autocomplete:s.binding.autocomplete,onChange:w},null,8,["modelValue","type","label","autocomplete"])]),_:1},8,["binding"]),o("div",j,[e[7]||(e[7]=o("h2",{class:"mb-4 text-xl font-bold text-red-800"},"🧪 Password Validation Test",-1)),e[8]||(e[8]=o("p",{class:"mb-4 text-sm text-red-600"}," Testing password validation via template refs after vee-validate dependency update ",-1)),o("div",N,[p(m,{ref:s=>{c.value.Password=s},modelValue:l.Password,"onUpdate:modelValue":e[1]||(e[1]=s=>l.Password=s),type:"password",validation:S(f),label:"Password (Test Input)",placeholder:"Enter your password",autocomplete:"new-password"},null,8,["modelValue","validation"]),o("div",{class:"flex flex-wrap gap-4"},[o("button",{class:"rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-600",onClick:b}," Test Validation via Ref "),o("button",{class:"rounded bg-purple-500 px-4 py-2 text-white hover:bg-purple-600",onClick:y}," Log Template Ref Contents "),o("button",{class:"rounded bg-gray-500 px-4 py-2 text-white hover:bg-gray-600",onClick:h}," Clear Form "),o("button",{class:"rounded bg-green-500 px-4 py-2 text-white hover:bg-green-600",onClick:x}," Set Test Value "),o("button",{class:"rounded bg-yellow-500 px-4 py-2 text-white hover:bg-yellow-600",onClick:P}," Set Short Value (Invalid) ")]),o("div",_,[e[6]||(e[6]=o("h3",{class:"mb-2 font-semibold"},"Debug Information:",-1)),o("div",F,[o("div",null,[e[2]||(e[2]=o("strong",null,"Form Value:",-1)),i(" "+d(l.Password||"undefined"),1)]),o("div",null,[e[3]||(e[3]=o("strong",null,"Form Value Length:",-1)),i(" "+d((l.Password||"").length),1)]),o("div",null,[e[4]||(e[4]=o("strong",null,"Last Validation Result:",-1)),i(" "+d(JSON.stringify(r.value,null,2)),1)]),o("div",null,[e[5]||
1(e[5]=o("strong",null,"Template Ref Available Methods:",-1)),i(" "+d(v.value),1)])])])])])]))}});export{q 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.