https://github.com/iamraphson/tcomb-form-types
Adds Types/Validations to tcomb-form
https://github.com/iamraphson/tcomb-form-types
Last synced: about 1 year ago
JSON representation
Adds Types/Validations to tcomb-form
- Host: GitHub
- URL: https://github.com/iamraphson/tcomb-form-types
- Owner: iamraphson
- Created: 2017-04-13T10:01:44.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-06T12:22:01.000Z (over 9 years ago)
- Last Synced: 2025-02-11T09:49:35.374Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Update: Orphan Project. Send me a mail if you'd like to become the maintainer/developer.
Exports types for [tcomb-form](https://github.com/gcanti/tcomb-form).
## Installation
```
npm install --save tcomb-form-types
```
## Usage
```js
import t from 'tcomb-form';
import {
alpha,
alphanumeric,
base64,
boolean,
creditcard,
date,
decimal,
email,
fqdn,
float,
hexcolor,
hexadecimal,
ip,
isbn,
integer,
json,
lowercase,
macaddress,
mobilephone,
mongoid,
numeric,
url,
uuid,
uppercase
} from 'tcomb-form-types';
const test = t.struct({
alpha: alpha,
alphanumeric: alphanumeric,
base64: base64,
boolean: boolean,
creditcard: creditcard,
date: date,
decimal: decimal,
email: email,
fqdn: fqdn,
float: float,
hexcolor: hexcolor,
hexadecimal: hexadecimal,
ip: ip,
isbn: isbn,
integer: integer,
json: json,
lowercase: lowercase,
macaddress: macaddress,
mobilephone: mobilephone,
mongoid: mongoid,
numeric: numeric,
url: url,
uuid: uuid,
uppercase: uppercase
});
```
### alpha
### alphanumeric
### base64
### boolean
### creditcard
### date
### decimal
### email
### fqdn
### float
### hexcolor
### hexadecimal
### ip
### isbn
### integer
### json
### lowercase
### macaddress
### mobilephone
### mongoid
### numeric
### url
### uuid
### uppercase