userfrosting / fortress

A schema-driven system for elegant whitelisting, transformation and validation of user input on both the client and server sides from a unified set of rules.
Other
25 stars 9 forks source link

Apply local or global data transformations #7

Open alexweissman opened 8 years ago

alexweissman commented 8 years ago

Instead of "sanitization", we could allow Fortress to apply local or global data transformations, as discussed here: https://github.com/userfrosting/UserFrosting/issues/423

The understanding would be that pre-storage transformations of user data would be the exception, rather than the rule.

alexweissman commented 8 years ago

How about allowing an arbitrary series of transformations? I.e.:

transform: ['trim', 'purge']

or

transform: ['purify', 'trim']