<!DOCTYPE html> <html> <head> <title>Title of the document</title> </head> <body> <input type="number" name="test_name" min="0" oninput="validity.valid||(value='');"> </body> </html>