Closed xaxist closed 9 years ago
I have a field named status in my User model. Any way I can have validation for that field?
status: { type: "string", enum: ['activating', 'activated'], defaultsTo: 'activating', required: true },
@anupsarode
Sure you can, as long as you are using valid sails validations rules that applies to enums
I have a field named status in my User model. Any way I can have validation for that field?