---
title: "Discussion on \"Allow only valid inputs for \"number\" input, using \"validity.valid\" and improve user friendliness\" | Hashnode"
description: "Discussion on \"Allow only valid inputs for \"number\" input, using \"validity.valid\" and improve user friendliness\". What is \"validity.valid\"?\nvalidity.valid is an inherent property of html5 form input element.\nIt is assigned a Realtime boolean value based on the content in input field.\nHow does it determine if its valid ?\nit uses ValidityState inbuilt WebAPI and c..."
url: "https://hashnode.com/posts/allow-only-valid-inputs-for-number-input-using-validityvalid-and-improve-user-friendliness/6151a59ccf735d72249a7ed1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Allow only valid inputs for "number" input, using "validity.valid" and improve user friendliness](https://vishnu-aithal.hashnode.dev/allow-only-valid-inputs-for-number-input-using-validityvalid-and-improve-user-friendliness?utm_source=hashnode&utm_medium=feed)

What is "validity.valid"? validity.valid is an inherent property of html5 form input element. It is assigned a Realtime boolean value based on the content in input field. How does it determine if its valid ? it uses ValidityState inbuilt WebAPI and c...

Sep 27, 2021 · 4 min read · vishnu-aithal.hashnode.dev  
Updated Oct 1, 2021  
Read the article

-   [#vanilla-js-1](https://hashnode.com/tag/vanilla-js-1)
-   [#user-experience](https://hashnode.com/tag/user-experience)
-   [#validation](https://hashnode.com/tag/validation)
-   [#html5](https://hashnode.com/tag/html5)

## Written by

[Vishnu Aithal](https://hashnode.com/@vishnu-aithal)

@vishnu-aithal

  
[View profile](https://hashnode.com/@vishnu-aithal)

webDev

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
