Skip to content

Validation as a custom function #444

Description

@TrilipuT

Hi !

Once more - thank you for such a great framework!

Is it possible to add a validation of field via custom function?
In my case i want to validate if the value is in some range based other field value (e.g. apartment number based on selected house)

somethink like

columns: [
        {
            name: 'flat',
            type: AdminForthDataTypes.STRING,
            validation: [
                {
                    function: function (value, record) {
                        return {ok: false}
                    },
                    message: 'callback error',
                },
            ],

        }
        ...
]

Or other case - make enum array dynamically updated based on connected field (but i think this one is harder to implement)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions