Skip to content

Custom angular.js directive for validating norwegian social security numbers

License

Notifications You must be signed in to change notification settings

finnmich/angular-hvikt-norwegianidnumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-hvikt-norwegianidnumber

Custom angular.js directive for validating norwegian social security numbers. Add "allowspacesinid" to allow spaces in the id. The value in the model will have the spaces removed. Add "checkdate" to check if the dates are valid (Will still accept D-, H- and FH-numbers)

###Example usage:

<form name="form" novalidate>
  <div>
	Id:
	<input type="text" ng-model="fnr" name="fnr" norwegianidnumber allowspacesinid checkdate />
	<br />
	Model: {{fnr}}
	<br />
    <span ng-show="form.fnr.$error.norwegianidnumber">Not a valid id!</span>
  </div>  
</form>

###To set up environment for testing

	npm install karma karma-jasmine karma-phantomjs-launcher --save-dev
	bower update
	karma start

About

Custom angular.js directive for validating norwegian social security numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published