It is always a good practise to mask input text boxes for standardizing data in various formats.
Lets first see how credit card number looks without masking:
<input type="text" size="20" autocomplete="off" class="form-control" id="number" required />
After applying the above script, we will get masking as below:
Now, you will notice that the numbers are easy to read and in a format which a payment card normally has.