Skip to content

Commit fd366e6

Browse files
committed
Implemented Validator, message formatting and validation rules.
0 parents  commit fd366e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4606
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,json,yml}]
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Logitar.js
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
name: Build Logitar.js
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout Repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node 20
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20.x
24+
25+
- name: Install dependencies
26+
run: npm clean-install
27+
28+
- name: Build for Production
29+
run: npm run build
30+
31+
- name: Run Tests & Coverage
32+
run: npm run test

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Logitar.js NPM package
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: Publish Logitar.js NPM package
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node 20
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.x
20+
registry-url: "https://registry.npmjs.org"
21+
22+
- name: Install dependencies
23+
run: npm clean-install
24+
25+
- name: Build for Production
26+
run: npm run build
27+
28+
- name: Publish to NPM registry
29+
run: npm publish --access=public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
dist
13+
dist-ssr
14+
coverage
15+
*.local
16+
17+
/cypress/videos/
18+
/cypress/screenshots/
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
29+
30+
*.tsbuildinfo
31+
32+
# yarn
33+
.pnp.*
34+
.yarn/*
35+
!.yarn/patches
36+
!.yarn/plugins
37+
!.yarn/releases
38+
!.yarn/sdks
39+
!.yarn/versions
40+
41+
## Storybook
42+
storybook-static

.prettierrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"printWidth": 160
4+
}

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
Nothing yet.
11+
12+
## [1.0.0] - 2025-04-21
13+
14+
### Added
15+
16+
- Implemented Validator, message formatting and validation rules.
17+
18+
[unreleased]: https://github.com/Logitar/js/compare/v1.0.0...HEAD
19+
[1.0.0]: https://github.com/Logitar/js/releases/tag/v1.0.0

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Logitar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logitar Validation.js
2+
3+
JavaScript validation library distributed by Logitar.
4+
5+
## Recommended IDE Setup
6+
7+
[VSCode](https://code.visualstudio.com/)
8+
9+
## Project Setup
10+
11+
```sh
12+
npm install
13+
```
14+
15+
### Type-Check, Compile and Minify for Production
16+
17+
```sh
18+
npm run build
19+
```
20+
21+
### Run Unit Tests and Code Coverage with [Vitest](https://vitest.dev/)
22+
23+
```sh
24+
npm run test
25+
```
26+
27+
### Run Unit Tests with Vitest
28+
29+
```sh
30+
npm run test:dev
31+
```
32+
33+
### Format with [Prettier](https://prettier.io/)
34+
35+
```sh
36+
npm run format
37+
```

0 commit comments

Comments
 (0)