Validation on the quantity field

Status
Complete
Assignee
Francisco Egloff
Type
Frontend
Due
Slated Version
v1.2
Related SMS PRD
Email PRD for NFT Creators
Last Edited
Aug 26, 2022 3:18 AM
Last Edited By
Francisco Egloff
Priority
Blocked
image
  1. Prevent the up/down arrows from appearing in Firefox (likely need to change field from number to text
  2. Prevent user from typing invalid input (comas, decimals, negative numbers)
  3. Disable minus button if quantity is ≤ 0

Solution: added the following css to App.scss

/* for chrome to remove up/down arrows in browsers*/
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;}             


/* for mozilla */  
input[type=number] {-moz-appearance: textfield;}