Hi,
I have one form with fields UserName and Password
Currently i am going do validations based upon Username exists
in database If exists need to display validation message
Ex:If we are going to enter same Username On form i need to display
validation message like below (Ex:already i have stored
UserName=mahesh agian if we are going to enter Username=mahesh)
User Name already exists
my final requirement is if UserName exists in database need to
display validation message(not alert message) at the time of entry in
UserName
Could you please help me
@{
Layout = null;
}
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.5/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.8/angular.min.js"></script>
<script src="~/scripts/dirpagination.js"></script>
<script>
var app = angular.module("myApp", ['angularUtils.directives.dirPagination']);
app.controller("myCntrl", ['$scope', '$http', function ($scope, $http) {
}]);
</script>
</head>
<body ng-app="myApp" ng-controller="myCntrl">
<div class="container">
<div>
<br />
<br />
<br />
<div id="wrapper" class="clearfix">
<form name="userForm" novalidate>
<div class="form-horizontal">
<div class="row">
<div class="col-md-3">
<label for="UserName">UserName</label>
<input type="text" class="form-control" ng-model="UserName" />
</div>
<div class="col-md-3">
<label for="Password">Password</label>
<input type="text" class="form-control" ng-model="Password" />
</div>
</div>
<div></div>
<div class="form-group" style="width: 120%; text-align: center; padding: 10px;">
<div class="col-md-offset-2 col-md-5">
<p>
<button class="btn btn-success btn-sm" ng-model="IsVisible" ng-click="AddUpdateUser()">Submitt</button>
</p>
</div>
</div>
</div>
</form>
</div>
<hr style="width: 550px;" />
<br />
</div>
</div>
</body>
</html>