Remove and Add Required Attribute in jQuery

Here I am explaining how to remove Required attribute from textbox with jQuery. Required is a jQuery validation keyword which is used to validate a textbox so that it won’t allow empty when submit the form. But in case if we dynamically don’t want to validation then we need to remove that attribute using removeAttr() function. Similarlly we can add Attribute by using attr() function.



See the below examples:-