Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SchUser=new SimpleSchema({
- Nome: {
- type: String
- },
- Cognome: {
- type: String
- },
- Telefono: {
- type: String,
- autoform: {
- type: 'tel'
- }
- },
- Email: {
- type: String,
- autoform: {
- type: 'email'
- }
- },
- Password: {
- type: String,
- min: 6,
- max: 50,
- autoform: {
- type: 'password'
- },
- optional:true
- },
- ConfPassword: {
- type: String,
- min: 6,
- max: 50,
- autoform: {
- type: 'password',
- label: 'Conferma Password'
- },
- optional:true,
- custom: function(){
- if(this.value!="" && this.field('Password').value!=""){
- if (this.value !== this.field('Password').value) {
- return 'noMatch';
- }
- }
- }
- },
- permissions: {
- type: [String],
- label: "Permessi",
- minCount:1,
- autoform:{
- type:"select-checkbox",
- options:{
- "value":"label",
- [...]
- }
- }
- }
- });
- SchStaff.messages({
- noMatch: "Password mismatch",
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement