@model IbanSample.SampleViewModel
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>IbanNet example</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
.field-validation-error {
<div class="col-md-6 col-md-offset-3">
@using (Html.BeginForm("Save", "Mvc", FormMethod.Post))
if (!ViewData.ModelState.IsValid)
@Html.ValidationSummary(false, null, new { @class = "alert alert-danger" })
else if (Model.BankAccountNumber != null)
<div class="alert alert-success">
The IBAN @Model.BankAccountNumber appears to be valid.
<p><a href="https://github.com/skwasjer/IbanNet">IbanNet</a> supports @ViewBag.SupportedCountries countries... Try one!</p>
if (ViewBag.ValidationResult != null && ViewBag.ValidationResult.Country != null)
<div class="alert alert-info">
The IBAN was validated with country rules for @ViewBag.ValidationResult.Country.EnglishName (@ViewBag.ValidationResult.Country.TwoLetterISORegionName).
@Html.LabelFor(m => m.BankAccountNumber)
@Html.TextBoxFor(model => model.BankAccountNumber, new {@class="form-control"})
<button type="submit" class="btn btn-success submit">Validate</button>
<div class="alert alert-warning fade">
<img src="http://entechprod.blob.core.windows.net/dotnetfiddle/morpheus.jpg" style="max-width:100%;"/><br/><br/>
<strong><span class="alert-content"></span></strong>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>