<form name="regForm">
<input type="text" id="username" name="username" ng-model="username" required>
<button ng-click="submitSignup()" type="submit" ng-disabled=" (regForm.username.$dirty && regForm.username.$invalid) || regForm.username.$pristine">Sign Up</button>
</form>
I need assistance in making sure that the input field is marked as invalid and the sign-up button remains disabled whenever a user inputs white space. It is essential that no white space should be allowed in the input field, whether it is typed or pasted. The sign-up button must remain disabled if any white space is detected, either by typing or pasting. Could someone please provide guidance on how to achieve this?