Skip to main content
added 3 characters in body
Source Link
Mik378
  • 22.2k
  • 15
  • 95
  • 191

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfillfulfilling the expectation.

  • If I enter nothing, required: true and number:false => why not number as true since empty string isn't a number?
  • If I enter fergrg, required: true and number:false => why not required to false and number to true?

The only case where it seems logic is when I enter a number, where both required and number would beget false.

The provided demo in the documentation confirms this rule.

Bug? Or any explanation?

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfill the expectation.

  • If I enter nothing, required: true and number:false => why not number as true since empty string isn't a number?
  • If I enter fergrg, required: true and number:false => why not required to false and number to true?

The only case where it seems logic is when I enter a number, where both required and number would be false.

The provided demo in the documentation confirms this rule.

Bug? Or any explanation?

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfilling the expectation.

  • If I enter nothing, required: true and number:false => why not number as true since empty string isn't a number?
  • If I enter fergrg, required: true and number:false => why not required to false and number to true?

The only case where it seems logic is when I enter a number, where both required and number get false.

The provided demo in the documentation confirms this rule.

Bug? Or any explanation?

added 34 characters in body
Source Link
Mik378
  • 22.2k
  • 15
  • 95
  • 191

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfill the expectation.

  • If I enter nothing, required: true and number:false => why not number as true since empty string isn't a number?
  • If I enter fergrg, required: true and number:false => why not required to false and number asto true?

The only case where it seems logic is when I enter a number, where both required and number would be false.

The provided demo in the documentation confirms this rule.

Why number boolean isn't alter regarding the case? Bug? Or any explanation?

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfill the expectation.

  • If I enter nothing, required: true and number:false => why not number as true?
  • If I enter fergrg, required: true and number:false => why not number as true?

The only case where it seems logic is when I enter a number, where both required and number would be false.

The provided demo in the documentation confirms this rule.

Why number boolean isn't alter regarding the case? Bug? Or any explanation?

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfill the expectation.

  • If I enter nothing, required: true and number:false => why not number as true since empty string isn't a number?
  • If I enter fergrg, required: true and number:false => why not required to false and number to true?

The only case where it seems logic is when I enter a number, where both required and number would be false.

The provided demo in the documentation confirms this rule.

Bug? Or any explanation?

Post Undeleted by Mik378
Post Deleted by Mik378
Source Link
Mik378
  • 22.2k
  • 15
  • 95
  • 191

Strangeness with Angular validation of input type="number"

According to the documentation, validation keys for an:
<input type="number" required />
are: required and number.

Let's recall that a key's value to true means key in error and false means fulfill the expectation.

  • If I enter nothing, required: true and number:false => why not number as true?
  • If I enter fergrg, required: true and number:false => why not number as true?

The only case where it seems logic is when I enter a number, where both required and number would be false.

The provided demo in the documentation confirms this rule.

Why number boolean isn't alter regarding the case? Bug? Or any explanation?