glhd / alpine-wizard

Multi-step wizard helpers for Alpine.js
MIT License
149 stars 3 forks source link

Validator problem #8

Open nohumans opened 1 year ago

nohumans commented 1 year ago

Hi! I have problem, I don't know if it's my mistake or the library's the code

the .js

import './bootstrap';

import Alpine from 'alpinejs';
import validator from 'validatorjs';
import wizard from '@glhd/alpine-wizard';
Alpine.plugin(wizard);
window.Alpine = Alpine;
Alpine.start();

the code

<form x-data="{name: ''}">

<div>
       <div x-wizard:step.rules="{ name: 'required|numeric|min:1|max:120' }">
              <input x-model="name" id="name" type="text"   name="name" />
       </div>
       <div x-wizard:step> ... </div>
       <div x-wizard:step> ... </div>
</div>

</form>

the error

caught TypeError: Cannot read properties of undefined (reading 'def')

Eny idea?

Thanxx

bm2ilabs commented 4 months ago

same thing, any idea how to fix this issue ?