[Task]: Add date validation :)
This commit is contained in:
parent
f1454f321c
commit
4ba6bfa009
|
@ -8,7 +8,9 @@
|
|||
<form class="ui form segment" ng-submit="submit()" ng-class="{'top attached':msg.type}">
|
||||
<div class="field">
|
||||
<label>Expiration Date</label>
|
||||
<input type="date" name="fouled_at" placeholder="Fouled at date (e.g. 2017-06-30)" ng-model="obj.fouled_at">
|
||||
<input type="date" name="fouled_at" placeholder="Fouled at date (e.g. 2017-06-30)" ng-model="obj.fouled_at"
|
||||
required="" pattern="((?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|
|
||||
1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31)))?">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Position</label>
|
||||
|
|
|
@ -16,7 +16,7 @@ angular.module('microStock')
|
|||
$scope.obj = {};
|
||||
$scope.msg = {type:'success',text:'Saved '+$scope.count+' good(s) from product '+$scope.product.title+'.'};
|
||||
}, function(){
|
||||
$scope.msg = {type:'error',text:'Error: During saving of '+$scope.count+' good(s) from product '+$scope.product.title+'.'};
|
||||
$scope.msg = {type:'error',text:'An error occurred while saving good(s) from product '+$scope.product.title+'.'};
|
||||
});
|
||||
};
|
||||
}]);
|
||||
|
|
Reference in New Issue