Skip to content

nager/Nager.TextValidation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nager.TextValidation

With this library you can validate a text is meaningful. Its calculate a average distance from the keys of a keyboard. Three Keyboard layouts available (Azerty, Qwerty, Qwertz)

var textValidator = new TextValidator(new QwertzKeyboardLayout());

//Good
var result = textValidator.Check("Amsterdam");
//result = 4.5072716803479853

//Bad
result = textValidator.Check("asdfghj");
//result = 0.8571428571428571