jazzdotdev / jazzdotdev/flute

model validations and update callbacks

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
17
Forks
4
PR merge metrics
No merged PRs in 30d

Description

In this type of model files:
https://github.com/foundpatterns/send-file-package/blob/master/models/slide.yaml

Validation fields:
It would be nice to handle fields validations such as (for example):
- Presence;
- Range;
- emptiness;
- string fitting pattern;
- ....

Callbacks events:
It would be also nice to define the name of callbacks to call when an item is `created` or `updated` or etc...

For example:

```
fields:
title:
type: string
validation:
presence: true
body:
type: string
on_create: on_create_my_method
```

`on_create_my_method` which is a method defined somewhere by the user of the framework.

Those features in Rails are named Active model and is documented in:
https://guides.rubyonrails.org/active_model_basics.html#model

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.