2. Backend validation only

MVC · rules on Registration · ModelState.IsValid · no client scripts

Bypass the UI with curl

You can bypass the browser UI. The request below sends intentionally invalid data (name too short, not an email, age 5).

Expected: FAILS on the server — form is redisplayed with validation errors (search for "required", "valid", "16"). No "Success" page.

Windows (cmd / PowerShell)
curl -k -L -sS -c cookies.txt -b cookies.txt -w "\n\nHTTP %{http_code}\n" -H "Content-Type: application/x-www-form-urlencoded" -d "Name=x&Email=not-an-email&Age=5" "https://app17i872272.luna.fhict.nl/Demo/Backend"
Linux / macOS
curl -k -L -sS -c cookies.txt -b cookies.txt -w '\n\nHTTP %{http_code}\n' -H 'Content-Type: application/x-www-form-urlencoded' -d 'Name=x&Email=not-an-email&Age=5' 'https://app17i872272.luna.fhict.nl/Demo/Backend'

-k ignores the local dev certificate. No -X POST (breaks redirects). -c/-b keeps cookies across redirects. Antiforgery is disabled for these demos.

Filter the HTML (use /C: for an exact phrase — a plain space means OR in findstr): … | findstr /i /C:"Registration received" or … | findstr /i /C:"field-validation-error"