Closed d33pak-s1ngh closed 7 years ago
@d33pak-s1ngh : if those things are read-only and coming dynamically (means system is going to decide those values), So need to validate those values. Just submit those values using hidden fields.
is there any way using which i can apply validation on read only text boxes? i cant use hidden fields values will come in textbox when user will select location on map and without selecting location it cant be submit. location will come base on map that's why it is read only where user can only change by selecting value from map
i have a read only field and i want to make it require where form can not be submitted if that field does not have a value. value comes dynamic and it can not be change thats why it is read only so can you tell me how i can validate it using your jquery validation. i use your jquery method like following where txtadd and txt range are readonly but require validation is not firing for those two.
var validator = addDeviceForm.validate({ rules: { txtname: {required: true}, txtdesc: {required: true}, txtadd: {required: true}, txtrange: {required: true, digits: true} }, messages: { txtname: {required: "Fence name is required"}, txtdesc: {required: "Description is required"}, txtadd: {required: "Address is required"}, txtrange: {required: "Range is required", digits: "Only numbers allowed"}, } });