[annotator-dev] validate annotation before store it

Michael Scharf annotator at scharf.gr
Thu May 29 13:27:24 UTC 2014


Hi Riccardo,

checking annotations in the client my be a good idea. But ultimately, it should
be checked on the server. Because normally you have no control on what is sent
via the API and only the server site you can make sure the data inserted is
consistent.

This is actually an interesting case where using different languages in the
client and in the server makes things more difficult. If the server is node.js
based, you can do a validity check in the client and do the same check
on the server...


Michael


On 2014-05-29 9:41, Riccardo Tasso wrote:
> I found that's a bug introduced by an extension of mine, so there's no bug in annotator. Anyway it's still interesting understand if it's possibile validate an annotation before store it.
>
> I tried returning false in the event "annotationCreated" but it doesn't work.
>
> Thanks,
>     Riccardo
>
>
> 2014-05-29 8:37 GMT+02:00 Riccardo Tasso <riccardo.tasso at gmail.com <mailto:riccardo.tasso at gmail.com>>:
>
>     Hi all, is there a way to check an annotation before it's send to the store?
>     I mean, one of my users found a way (I don't know how) to insert an annotation whose begin is greater than end and I need to avoid the insertion of those kind of annotations.
>
>     Cheers,
>          Riccardo
>
>
>
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>





More information about the annotator-dev mailing list