Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before or after the fact validation #5

Open
raducoravu opened this issue Dec 9, 2019 · 0 comments
Open

Before or after the fact validation #5

raducoravu opened this issue Dec 9, 2019 · 0 comments

Comments

@raducoravu
Copy link
Contributor

Converted from internal issue EXM-38781.

Discuss about these different types of validation: before and after the content is inserted.

An answer I gave some time ago:

All the automatic validation that we do is "after the fact" validation, validation which is performed on the current state of the edited document.
Because it may take a while on large documents validation is done on a separate parallel thread in order not to block the user from editing so we cannot block the user interaction with the keyboard (for example user types "a" and we need to validate an entire document before inserting "a" in the document).

I'm thinking about this particular case, I've filled forms which add these restrictions recently and I would find it very frustrating if the application rejected my input. For example I may paste a small fragment of text from some place else. I know the text is too long but after I paste I want to review the entire short description and make it shorter.

We have Java-based API which could be used to intercept editing events from the end user and maybe reject the event if it would make the document not valid in a way. So if you want to try this approach I could try to give you some hints, the checks would no longer use Schematron but you could have similar Java-implemented rules.

In the meantime maybe you can report the overflow of the shortdesc as an error and also in the Preferences->"Editor / Open/Save" page we have a "Check errors on save" checkbox which your writers could check in order to be notified before save that there are still problems in the document.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant