Allow validation rules to only run on update

This issue has been created since 2022-06-24.

Currently reactive validation rules are always ran on create, to facilitate rules like:

config.addRule("lineItems", (c) => {
  if (c.lineItems.get.length === 0) {
    return "Must have at least one line item";
  }
});

That want to fire even if the field/property is not initially set.

However, some rules do want to only run on field change, i.e.:

config.addRule({ quantity: {} }, (celi) => {
  if (celi.entity.changes.quantity.hasUpdated && ...some condition...) {
    return "Cannot change the quantity once ...condition...";
  }
});

It seems like we could support this with an up modifier, like quantity_up ==> don't run on create.

More Details About Repo
Owner Name stephenh
Repo Name joist-ts
Full Name stephenh/joist-ts
Language TypeScript
Created Date 2020-02-02
Updated Date 2022-08-28
Star Count 121
Watcher Count 7
Fork Count 9
Issue Count 67

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Bug: The popup menu acts very flaky 7 2022-02-19 2022-09-27
Getting the SQL statement from stdin 4 2022-07-16 2022-09-19
app.goto.com - Firefox is unsupported browser 2 2022-03-09 2022-08-21
Id like support for TexFAT 1 2021-05-01 2022-09-19
Allow adding files to existing directory 1 2022-04-15 2022-09-25
Не выводится ошибка No relays are reachable, at all. 3 2022-03-18 2022-09-21
Cookies dissapearing on page refresh and go back on next refresh 4 2020-12-21 2022-09-19
Not really a bug... more of a request if possible 1 2021-03-26 2022-09-25
How to access an object of FinViewBox in _update_gfx function 1 2021-07-15 2022-09-12
IndexError occurs for coins with very low value like SHIB and PIG etc 1 2021-08-24 2022-09-12
Is the log - log scale plot possibble ? 2 2021-07-20 2022-09-12
[BUG] GitHub service broken 15 2021-08-03 2022-09-24
Document CellProfiler+ImageJ mechanism(s) in the right places 1 2022-02-08 2022-09-08
misspelling of Is-PrimeRabbinMiller 1 2017-04-07 2021-12-25
Is-PrimeRabinMiller 1 2021-03-03 2021-12-25
How can I encrypt a file using this script? 0 2021-04-08 2021-12-25
VROOM compiled without routing support? 6 2022-08-10 2022-08-31
Does KivyMD require python 3.10 now? 3 2022-09-07 2022-09-29
Python inference to convert wav to text 1 2021-02-02 2022-09-25
pip install -e . run error 6 2021-02-01 2022-09-25
Problems running the example with Java 17 8 2021-09-23 2022-09-25
[WASM] __heap_base is always 0 5 2021-12-06 2022-09-25
如何让装备文字带颜色(特绿,双绿等) 1 2021-01-11 2022-01-21
Python version problem 6 2022-01-05 2022-09-25
Datatype picker: suggested datatypes includes items from removed flows 0 2022-07-04 2022-08-30
VueDevtools not data 1 2021-08-27 2022-09-27
AWS section not working without AWS_VAULT 1 2021-10-28 2022-09-27
Make use of `err.cause` when available 3 2021-11-14 2022-09-21
"poetry add black terminus-db" fails in new project 5 2022-03-25 2022-09-18
Nanohives not accounting for wireless bonus 3 2022-05-16 2022-09-25
Margin brokes in horizontal list of cards with vertical lists (nested swipers) 1 2022-03-19 2022-09-25
Mechanism to add security interceptors to build-in beans 0 2021-09-17 2022-09-25
issues with `--pipe` option 1 2022-05-15 2022-09-25
Export of localizations not working with PowerShell 7.2.6 0 2022-08-22 2022-09-27
Hint label in 2D editor appears at wrong position and pushes zoom controls 3 2022-01-26 2022-08-30
Install Error 5 2021-03-04 2022-01-06
Possible bug in Perl 6 OO 6 2018-06-04 2022-09-19
[Android] Calling SDK - Upon re-entering the conference , I can see multiple instances of my previous one 2 2021-10-21 2022-09-22
[Event Request] codeunit 6500 "Item Tracking Management" - OnCopyItemTracking3OnBeforeReservEntry1Insert 0 2022-08-19 2022-09-08
proposal: net/http/httputil: can ReverseProxy copy src header to dst header with Set() instead of Add() ? 14 2022-01-21 2022-09-03
500 Server Error at log out at order page in Prestashop 1.7.3.0 3 2019-05-20 2022-09-13
Highlighting is not on by default. 1 2015-01-29 2022-08-11
Engine - Graph redesign 0 2022-03-17 2022-08-25
consider syncing history more frequently 2 2022-07-07 2022-08-12
vault debug on Windows results in panic 0 2022-03-07 2022-09-24
Rendering issue in Configuring OpenID Connect in Google Cloud Platform 5 2021-11-15 2022-09-19
Affected cpes don't make a lot of sense and dealing with versioning cadence. 2 2022-04-01 2022-08-17
Settings to specify formatting of type parameters 1 2021-09-14 2022-09-25
SOFA-Jraft优化咨询 45 2021-12-15 2022-01-14
missing $ on store page 0 2021-01-14 2022-08-26