olton / Metro-UI-CSS

Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
http://metroui.org.ua/
MIT License
7.04k stars 1.96k forks source link

Form validation "required number" not working #1950

Closed ct12goa closed 2 months ago

ct12goa commented 2 months ago

Describe the bug In the form the input validation data-validate="required number" is not working as expected.

To Reproduce I checked even the example code given at https://docs.metroui.org.ua/validator.html.

<div class="form-group">
    <label>Input age</label>
    <input type="text" data-validate="required number" name="age">
     <span class="invalid_feedback">Please give only numbers</span> 
</div>

Expected behavior It should accept numbers, and "invalid_feedback" should invoke only when input is not a number. But, it invokes it for every input, even when we input a valid number.

Screenshots image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context None

olton commented 2 months ago

Please check it in latest version

ct12goa commented 2 months ago

How to check in latest version? I am using the CDN using this link https://cdn.metroui.org.ua/current/metro.css Is this not the latest?

olton commented 2 months ago

Thank you. This is a bug in Guardian library. Now fixed in dev, tomorrow I merge this fix into master.

olton commented 2 months ago

fixed in master