
EC-CouncilCertified Application Security Engineer (.NET)
Domain 3Objective 4
Input Validation for MVC CASENET Practice Questions (Page 9)
Part of the Secure Coding: Input Validation domain, which makes up ~11% of our current practice bank. EC-Council does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–9 in this domain), expect 2–2 from this objective — we provide 52 practice questions to prepare you well beyond it. (estimate)
52questions here
11free pages
15concepts
Questions 41–45
- 41
Which method must be implemented when a class implements IValidatableObject?
Select an answer first - 42
An MVC application has a model with a [Required] attribute on the Title property. When a user submits the form without a title, the controller action checks ModelState.IsValid and returns the view with the model. The view uses asp-validation-for to display errors. However, the error message is not displayed. What is the most likely cause?
Select an answer first - 43
A developer is implementing input validation for a 'Country' field in an MVC registration form. The application must accept any valid country name. The developer is considering whether to use a whitelist or a blacklist approach. The security team has mandated whitelist validation. Which implementation best satisfies the mandate while maintaining usability?
Select an answer first - 44
A web application has a form where users enter a phone number. The business requirement is that the phone number must be in the format XXX-XXX-XXXX, where X is a digit. The development team wants to enforce this rule using declarative validation on the model. Which regular expression should be used in the [RegularExpression] attribute?
Select an answer first - 45
Why is whitelist validation generally preferred over blacklist validation for security?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “CASENET” is a trademark of its owner, used for identification only.