Hi
$('#locationFormId').bootstrapValidator({
container: '#messages',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
Id: {
validators: {
notEmpty: {
message: 'Id is required and cannot be empty'
}
},
stringLength: {
max: 4,
message: 'Id must not be more than 4 characters long'
},
regexp: {
regexp: /^[a-zA-Z\.]+$/,
message: 'Id can only consist of alphabets.'
}
},
Description: {
validators: {
notEmpty: {
message: 'Description is required and cannot be empty'
}
},
stringLength: {
max: 25,
message: 'Description must not be more than 25 characters long'
},
regexp: {
regexp: /^[a-zA-Z\.]+$/,
message: 'Description can only consist of alphabets.'
}
}
}
});
*******************************************************************************************
@using (Html.BeginForm("CreateEdit", "Location", FormMethod.Post,new { @id = "locationFormId", @class = "form-horizontal", role = "form" }))
{
}
Thanks
Ramco RamcoPosted Jun 14, 2021, 6:12 AM
Sachin SinghPosted Jun 14, 2021, 6:08 AM
Ramco RamcoPosted Jun 14, 2021, 5:37 AM
Sachin SinghPosted Jun 14, 2021, 5:26 AM
Ramco RamcoPosted Jun 14, 2021, 5:15 AM
Hi Sachin
Now nothing is working
fields: {
txtId: {
validators: {
notEmpty: {
message: 'Id is required and cannot be empty'
}
},
stringLength: {
max: 4,
message: 'Id must not be more than 4 characters long'
},
regexp: {
regexp: /^[a-zA-Z\.]+$/,
message: 'Id can only consist of alphabets.'
}
},
txtDescription: {
validators: {
notEmpty: {
message: 'Description is required and cannot be empty'
}
},
stringLength: {
max: 25,
message: 'Description must not be more than 25 characters long'
},
regexp: {
regexp: /^[a-zA-Z\.]+$/,
message: 'Description can only consist of alphabets.'
}
}
}
Thanks
Sachin SinghPosted Jun 14, 2021, 4:52 AM
Sachin SinghPosted Jun 13, 2021, 5:12 PM