Muljayan / digiexam-homework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Thought Process

  • I converted the type Input of the input field if the type is number, so that the input field only accepts numbers.
  • Alternatively, we could keep the current setup and add validation using isNaN()
  • I've added validation for the number input type to add a range of numbers
  • For string type input type I initially used regex to check for hard coded patterns. (This is currently commented off)
  • The updated validation uses an input field for users to add custom regex patterns

Future functionality

  • Add date validation similar to number validation to ensure the date is within a range
  • Combine preset and custom validations

About


Languages

Language:TypeScript 88.6%Language:CSS 8.0%Language:JavaScript 1.8%Language:HTML 1.6%