How to properly sanitise & check POST data from REST API? Which libraries can you suggest? best ways nowadays in 2022

This page summarizes the projects mentioned and recommended in the original post on /r/webdev

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • HTML Purifier

    Standards compliant HTML filter written in PHP

  • Or HTMLPurifier.

  • FluentValidation

    A popular .NET validation library for building strongly-typed validation rules.

  • I remember FluentValidation being a nice library for this type of stuff.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • class-transformer

    Decorator-based transformation, serialization, and deserialization between objects and classes.

  • I really enjoyed using class-transformer and class-validator for this.

  • class-validator

    Decorator-based property validation for classes.

  • I really enjoyed using class-transformer and class-validator for this.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts