From 14cb1aecd19293a89dfb9a24d0dc5fd5c49e27a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yanis=20Zafir=C3=B3pulos?= <1265028+drkameleon@users.noreply.github.com> Date: Wed, 28 Aug 2024 10:09:58 +0200 Subject: [PATCH] Update README.md --- README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/README.md b/README.md index 8f0aa3c..25671e2 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,89 @@
+ +--- + + + +* [What does this package do?](#what-does-this-package-do) +* [How do I use it?](#how-do-i-use-it) +* [Function Reference](#function-reference) +* [License](#license) + + + +--- + +### What does this package do? + +This package provides a function (`valid?`) that allows to check and validate strings, based on different built-in schemes/patterns, e.g e-mails, urls, etc. + +### How do I use it? + +Simply `import` it and use the included `valid?` function: + +```arturo +import "validator"! + +valid?.url "https://arturo-lang.io" +; => true + +valid?.email "loremIpsum@ +; => false +``` + +> [!TIP] +> Different type of checks may accept different extra params, so you'd better have a look into the reference first! :) + + +### Function reference + +#### `valid?` + +##### Description + +check if given string is valid + +##### Usage + ++valid? str :string ++ +##### Attributes + +| Option | Type(s) | Description | +|----|----|----| +| email | | verify e-mail address | +| url | | verify URL | + +##### Returns + +- *:logical* + +