Need small coding help
I need to restrict character input to 10 characters as number input. I am attaching the code. Can someone tell me what addition I need to make and where so as to limit the input to ten characters. I am attaching the screenshot also for the mobile number field. code-
// display the custom fields
function at_custom_fields() {
?>
<fieldset class="at_fieldset">
<legend><?php _e('Please enter 10 digit mobile number (required)', 'appthemes'); ?></legend>
<p>
<input class="text" type="text" name="at_name" id="at_name" value=<?php if (isset($_POST['at_name'])) echo esc_attr($_POST['at_name']); ?>>
</p>
<p>
<input type="checkbox" name="at_age" id="at_age" value="yes" <?php echo checked( ! empty( $_POST['at_age'] ) )?> />
<label for="age"><?php _e('I agree I\'m above 18 years and I agree to the terms and conditions of this website ', 'appthemes'); ?></label>
</p>
</fieldset>
<br/>
<style type="text/css">
.at_fieldset { border: 2px solid #ccc; padding: 10px; border-radius: 5px; }
.at_referral_note { font-size: 14px; color: #ccc; }
.at_number { width: 100px }
</style>
<?php
}
mobile field.jpg