nager / Nager.TextValidation

Validate text via keyboard keys position

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Validate text via keyboard keys position

License:MIT License


Languages

Language:C# 100.0%