Use the novalidate attribute to specify that the form should not be validated when disabled. You can try to run the following code to implement novalidate attribute −
Example
<!DOCTYPE html> <html> <head> <title>HTML novalidate attribute</title> </head> <body> <form action = "" method = "get" novalidate> Student Name<br><input type = "name" name = "sname"><br> Rank<br><input type = "number" name = "rank"><br> <input type = "submit" value = "Submit"> </form> </body> </html>