[SOLVED] V5.3.0 - Why app.input.validate return undefined

I want to make a validation for mandatory values but the return value is undefined

<form class="list" id="companyform">
               <div class="card">
                                    <div class="card-content">
                                <ul>

                                    <li class="item-content item-input item-input-with-info">

                                        <div class="item-inner">

                                            <div class="item-title item-label">Address</div>

                                            <div class="item-input-wrap">

                                                <input type="text" name="address" id="address" placeholder="Address" required validate>

                                                <span class="input-clear-button"></span>

                                            </div>

                                        </div>

                                    </li>
            ...................................................................

        var valid = app.input.validateInputs('#companyform');

        console.log(valid);

        console.log(app.input.validate('#address'));

This methods doesn’t return anything, its only validate inputs elements and add required visuals to invalid elements

thanks for the answer. I need to stop an ajax query. to do this I need a function that returns whether the form values ​​are correct.

app.input.validateInputs('#companyform');
var valid = $('#companyform .input-invalid').length === 0
1 Like

Thank you. It is working