I am curious to know how kaffy is validating forms with changeset and is it possible to customize the validation with different changesets in schema in admin modules
note: in my application context, admin module name is different from schema name
enterprise: [
name: "Enterprise",
resources: [
plan: [
schema: WraftDoc.Enterprise.Plan,
admin: WraftDocWeb.PlanAdmin
],
enterprise_plan: [
schema: WraftDoc.Enterprise.Plan,
admin: WraftDocWeb.EnterprisePlanAdmin
]
]
],
in WraftDocWeb.EnterprisePlanAdmin added
def create_changeset(schema, attrs) do
Plan.custom_plan_changeset(schema, attrs)
end
in plan admin with plan schema validations and everything works fine, in enterprise plan admin form validation not working, in case any changeset errors it raises error and not displaying the errors at form fields, if changeset is valid will create.