PHPackages                             oxmohsen/validating-data - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. oxmohsen/validating-data

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

oxmohsen/validating-data
========================

example of how to validate incoming data from web app telegram bot to ensure that the data is come from telegram.

v1.0.0(3y ago)342.7k3[1 issues](https://github.com/OxMohsen/validating-data/issues)MITJavaScript

Since Aug 22Pushed 3y ago4 watchersCompare

[ Source](https://github.com/OxMohsen/validating-data)[ Packagist](https://packagist.org/packages/oxmohsen/validating-data)[ RSS](/packages/oxmohsen-validating-data/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

[![Contributors](https://camo.githubusercontent.com/d2dd35307de1c1f7afafeea48f3775b964a5185e5d500fc660662b780ad7113d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4f784d6f6873656e2f76616c69646174696e672d646174612e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/OxMohsen/validating-data/graphs/contributors)[![Forks](https://camo.githubusercontent.com/6cef86efa6a981db112ccb4e914c7dd87f765b836cf100bc7c3c0a32b4fffbce/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4f784d6f6873656e2f76616c69646174696e672d646174612e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/OxMohsen/validating-data/network/members)[![Stargazers](https://camo.githubusercontent.com/f9da234a3b0d5c01435da24bd2d36f13602b42046ca8201b87f57c7323d5e1ad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4f784d6f6873656e2f76616c69646174696e672d646174612e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/OxMohsen/validating-data/stargazers)[![Issues](https://camo.githubusercontent.com/e2d56396788d4b4761aebab8ffc60b2c28dca0647a4c50ec197e1c7ccbc84919/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4f784d6f6873656e2f76616c69646174696e672d646174612e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/OxMohsen/validating-data/issues)[![MIT License](https://camo.githubusercontent.com/6c1d6a971cb443810ddc76370f6e731103d2785477e157ff64830211014b3418/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4f784d6f6873656e2f76616c69646174696e672d646174612e7376673f7374796c653d666f722d7468652d6261646765)](https://github.com/OxMohsen/validating-data/blob/master/LICENSE)

validating-data
---------------

[](#validating-data)

 project to validate telegram web app data.

 [Example](https://github.com/OxMohsen/validating-data/blob/main/example) · [Report Bug](https://github.com/OxMohsen/validating-data/issues) · [Request Feature](https://github.com/OxMohsen/validating-data/issues)

 Table of Contents1. [About The Project](#about-the-project)
    - [Built With](#built-with)
2. [Getting Started](#getting-started)
    - [Installation](#installation)
3. [Usage](#usage)
4. [Contributing](#contributing)
5. [License](#license)
6. [Contact](#contact)

About The Project
-----------------

[](#about-the-project)

valid datainvalid data[![](img/valid.jpg)](img/valid.jpg)[![](img/invalid.jpg)](img/invalid.jpg)php code for validating incoming data from telegram web app bot to ensure that the data is valid and comes from the telegram. in example folder you can see how to use this code by using `ajax` and `php`.

([back to top](#top))

### Built With

[](#built-with)

- [PHP](https://www.php.net/)
- [JQuery](https://jquery.com)

([back to top](#top))

Getting Started
---------------

[](#getting-started)

These instructions will get you a copy of the project and show you how to use it. You'll need [Git](https://git-scm.com) and [composer](https://getcomposer.org/download/)

### Installation

[](#installation)

1. using composer

    ```
    composer require oxmohsen/validating-data
    ```
2. install manually

    - Clone the repo ```
        git clone https://github.com/OxMohsen/validating-data.git
        ```
    - move to the directory ```
        cd validating-data
        ```
    - Install composer packages ```
        composer install
        ```

### Usage

[](#usage)

1. load the project ```
    require_once __DIR__ . '/vendor/autoload.php';

    use OxMohsen\TgBot\Validate;
    ```
2. use the Validate class to validate initData ```
    if (Validate::isSafe($bot_token, $initData)) {
        echo 'valid data';
    } else {
        echo 'invalid data';
    }
    ```

you can also see a simple example in the [example folder](https://github.com/OxMohsen/validating-data/tree/main/example).

([back to top](#top))

Contributing
------------

[](#contributing)

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

([back to top](#top))

License
-------

[](#license)

Distributed under the MIT License. See `LICENSE` for more information.

([back to top](#top))

Contact
-------

[](#contact)

Mohsen Falakedin - [@oxmohsen](https://t.me/oxmohsen) -

Project Link:

([back to top](#top))

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1364d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5afc4550f2b295526192a3f4ff9777e03c77721e7096ad024225493a7a09bddd?d=identicon)[oxmohsen](/maintainers/oxmohsen)

---

Top Contributors

[![OxMohsen](https://avatars.githubusercontent.com/u/104103618?v=4)](https://github.com/OxMohsen "OxMohsen (8 commits)")

---

Tags

telegram-bot-apitelegram-web-appwebapp

### Embed Badge

![Health badge](/badges/oxmohsen-validating-data/health.svg)

```
[![Health](https://phpackages.com/badges/oxmohsen-validating-data/health.svg)](https://phpackages.com/packages/oxmohsen-validating-data)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
