Determine the best validation control for each input: Username (compulsory):Answer 1Display a summary of all of the validation errors on the page:Answer 2Re-type password:Answer 3United States postal code:Answer 4Number of tickets (maximum 20):Answer 5Odd number only:
Question
Determine the best validation control for each input: Username (compulsory):Answer 1Display a summary of all of the validation errors on the page:Answer 2Re-type password:Answer 3United States postal code:Answer 4Number of tickets (maximum 20):Answer 5Odd number only:
Solution
Username (compulsory): The best validation control would be to check if the input field is not empty. If it is, an error message should be displayed.
Display a summary of all of the validation errors on the page: The best validation control would be to collect all validation errors throughout the form and display them in a list at the top or bottom of the page.
Re-type password: The best validation control would be to compare this input with the initial password input. If they do not match, an error message should be displayed.
United States postal code: The best validation control would be to check if the input matches the format of a US postal code. This is typically a five-digit number, but can also include a hyphen and four additional digits. If the input does not match this format, an error message should be displayed.
Number of tickets (maximum 20): The best validation control would be to check if the input is a number and if it is less than or equal to 20. If it is not, an error message should be displayed.
Odd number only: The best validation control would be to check if the input is an odd number. This can be done by checking if the remainder of the input divided by 2 is not 0. If it is, an error message should be displayed.
Similar Questions
Choose the right statement about validation controls. Can have multiple validation controls on a single input control.A RangeValidator is used when input must conform to a pre-defined pattern.Only the RequiredFieldValidator checks empty controls.Page Validation enables you to verify that all of the controls on a page are valid before the controls perform some action.a.ii, ivb.ii, iii, ivc.i, iii, ivd.i, ii, iv
Identify three methods of validation.
Design a login form using HTML & JavaScript with following validations usingRegular Expression on username and password fields.1. Username and Password should not be both blank2. Username should not start with digit,_, @ or #3. Password length must be 8 to 16 characters
As a programmer for JScript, Inc., you have been assigned to a team to develop a Web site for IT support requests. The Web designer you are working with is good at the visual aspects of the Web forms, but lacks the knowledge to implement the JavaScript code for form validation. There is a new ticket submission form that needs validation. The data on the form and field names are shown below.Ticket Input Form DataReqDate (request date, required, must be mm/dd/yyyy format)EmpID (employee ID, required, must be 6 alphanumeric characters, starting with a capital letter, followed by 5 numbers)FName (user first name, required, must start with capital letter)LName (user last name, required, must start with capital letter)ProbDesc (problem description, required)Your task is to write the JavaScript code for appropriate input validation for this form. The validation code for the form will be in a function called validateInputForm(form) where the form parameter is an object with access to each form field by the names given in the list for each form. The function will return true if the form input is valid, or false if the form input is invalid. The function will be responsible for issuing appropriate alert messages for any invalid input, and should return after finding the first invalid input and notifying the user. The validation function should use if statements and regular expressions where appropriate to validate the input.
Question14Max. score: 1.00Lack of input validation in an application can leed to _________.A) Cross Site ScriptingB) Command injectionC) None of the aboveD) Both A and BReset Answer
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.