- validation: Validate null field type correctly (#91) (1cb8b61f)
- files: accept object value with
name
property (#91) (1cb8b61f)
-
modify:
-
createHeadlessForm:
- modify:
Adds modify
utility for better customizations (#75)
- Rename
value
->forcedValue
. This is in regards to thejson-logic
, where a "forced value" will now be returned in each relevant field (i.e. fields where the schemaconst
anddefault
are the same) withforcedValue
overvalue
. (#66) (77c445a9)
- conditionals: Certain conditions in a JSON schema were failing. This bugfix adds missing field context to the evaluation to prevent the error. (#65) (6755a2fd)
BREAKING CHANGES:
- Follow-up of #57. Ignore internal attributes from conditional attributes removal (
visibilityCondition
) (#59) (57fe4468)
- Follow-up of #57. Ignore internal attributes from conditional attributes removal (
Component
,calculateDynamicProperties
) (#58) (ee762c2e)
BREAKING CHANGES:
- Description/Extra/Statement fields: We have removed the sorrounding spans that we output in these fields (#17) (6257533)
-description: '<span class="jsf-description">Write in <b>hh:ss</b> format</span>',
+description: 'Write in <b>hh:ss</b> format',
-
New custom JSON Schema keyword
x-jsf-logic
added to support cross-field validations. Built on top of JsonLogic. -
x-jsf-logic
can contain:validations
- JsonLogic rules that validate fields and return booleanscomputedValues
- JsonLogic rules that compute dynamic valuesallOf.if/then/else
- Conditional logic using validations and computedValues
-
New property
x-jsf-logic-validations
added to individual schema properties. Lists the validation names that should run on that property. -
New property
x-jsf-logic-computedAttrs
added to individual schema properties. Allows computed values to be used for attributes liketitle
,description
,const
, etc. -
Computed values and validations defined in
x-jsf-logic
can reference schema properties usingvars
and any syntax supported from JsonLogic. -
Conditional logic blocks allow selectively requiring fields or applying attributes based on validations/computed values.
While docs are underway, you can read examples from all the tests along with the sample schemas.
In short: x-jsf-logic
is added to support complex conditional cross-field validations. Properties like x-jsf-logic-validations
allow hooking those up to individual fields.
- json-logic: Computed Attributes (#36) (80c29589)
- json-logic: Initial skeleton implementation (#35) (63149ae8)
- conditions: Validate a deeply nested if (e.g. checking an object with a number property) in an if property now doesn't break the form. (#33) (e34cfcc)
- fieldset: support root conditionals for fieldsets (#23) (65d87b3a)
- select/radio: Accept just the values in options (plus
''
andnull
for backward-compatibility) (#18) (37501d2d)
BREAKING CHANGES:
- Add Typescript declarations to the library (2404188c)