Lvp.js is a data validation library.
- Cross Js platform: lvp.js supports umd, cmd, and esm specifications.
- Easy to use, ultra small size: The internal logic is simple to implement, there is no redundant design, trying to solve the most things with the least code.
- Highly customizable and non-invasive: You can customize the validation rules arbitrarily, and there are no compatibility issues with any framework.
You can use npm
npm i lvp.js
or cnd
<script src="https://unpkg.com/lvp.js/lib/lvp.js"></script>
You can find the Lvp.js documentation on the website.
This is a simple example of a single value check,for more detailed examples, please check here
var phone = "15555555555";
var isCNPhone = lvp.test({ value: phone, rules: "isCNPhone" });
Lvp.js is MIT licensed.