mahenda Posted December 31, 2019 Share Posted December 31, 2019 How can I add parsley attributes /rules in custom.js file instead of adding them in form field I have <form id="register"> <input type="email" name="email" id="email"> </form> //Js $("#register"). parsley ( //How to write all validation here not inside the input element. ); Quote Link to comment https://forums.phpfreaks.com/topic/309768-parsley-js-plugin-help/ Share on other sites More sharing options...
NotSunfighter Posted December 31, 2019 Share Posted December 31, 2019 mahenda, I don't like frameworks, because straight raw coding can do the same thing usually with less overhead. I the case of forms normal CSS and PHP does a fine job of this. All forms need to be validated and clean up on the server anyway. This the PHP part of my response. Using things like the <input type=""> and the 'required' attribute. Code your form with these and validate on the server. Quote Link to comment https://forums.phpfreaks.com/topic/309768-parsley-js-plugin-help/#findComment-1573013 Share on other sites More sharing options...
mahenda Posted December 31, 2019 Author Share Posted December 31, 2019 How can I instruct user with normal php, Since normal php depend on form submission while the plugin help and instruct user to fill correct data Quote Link to comment https://forums.phpfreaks.com/topic/309768-parsley-js-plugin-help/#findComment-1573014 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.