jquery validation errorplacement
$(document).ready(function () {
$('#add_client').validate({
errorClass: 'validation_errors',
debug: false,
rules: {
client_name: {
required: true
},
client_address: {
required: true
},
client_city: {
required: true
}
},
errorPlacement: function (error, element) {
console.log('dd', element.attr("name"))
if (element.attr("name") == "client_city") {
error.appendTo("#messageBox");
} else {
error.insertAfter(element)
}
},
messages: {
client_name: {
required: "The Client name is a required / mandatory field"
},
client_address: {
required: "The Client address is a required / mandatory field"
},
client_city: {
required: "The City is a required / mandatory field"
},
},
submitHandler: () => {
$('#send_form').on('click', submitFormHandler)
$('#send_form').trigger('click')
$('#terms-of-use').removeClass("checked")
$('#terms').removeClass("checked")
}
});
});
Also in JavaScript:
- js date minus 18 years
- reactnode prop-types
- recieve voice channel audio discord.js
- flutter intl currency
- express unique validator for the owner
- how to get header in all the pages in visualforce page
- how to get csrf token in javascript
- react native header
- angular absolute routerlink
- cannot concatenate object of type "<class 'str'>"; only pd.Series, pd.DataFrame, and pd.Panel (deprecated) objs are valid
- navigation react pass props
- objects in javascript
- javascript Compare two arrays regardless of order
- mongodb replace document
- how to add data to array in javascript dynamically
- orm for postgres node js
- how to use javascript to get full file path
- ternary operator javascript
- react native passing parameters to routes
- react bootstrap carousal not working
- https with express
- ckeditor get instance from textarea
- javascrip reverse text
- check if 2 strings matches js