0.2.8 • Published 5 years ago
@try-parser/fte v0.2.8
fte guides
Installation
npm i @try-parser/fte -S
Plugins
import Vue from 'vue'
import Components from '@try-parser/fte'
import '@try-parser/fte/dist/fte.css'
Vue.use(Components)
main.ts
import './plugins/fte'
Example Code
<e-form ref="ezForm">
<e-input v-model="firstname"
kv="first_name"
:value="firstname"
label="Firstname"
:rules="[]"
klass="sample class"
type="text"
tip="right">
</e-input>
</e-form>
let form = this.$refs.ezForm
if(form.validate()) {
console.log(form.gen())
}
Example Rules
const defaultRule:any = [
(v:any) => !!v || 'Field is required',
(v:any) => (v && v.length <= 1024) || 'Name must be less than 1024 characters'
]
const emailRule: any = [
(v: any) => !!v || 'E-mail is required',
(v: any) => /.+@.+/.test(v) || 'E-mail must be valid'
]
const emptyRule: any = [
(v: any) => !!v || 'Field is required',
]
const uuidRule: any = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
0.2.8
5 years ago
0.2.7
5 years ago
0.2.6
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago