Comments (5)
I would like to work on this under hacktober. can u assign this to me
from validator.js.
Thank you for your interest in working on this issue! I appreciate your enthusiasm. However, I suggest we wait for the repository maintainer to have a look at the issue first. Once they provide their input, we can collaborate on resolving it together. This way, we can ensure that any changes made align with the project's goals and guidelines. Thanks again for your willingness to contribute!
from validator.js.
Thank you for getting back to me. I'm more than happy to wait for the repository maintainer's input and collaborate on resolving the issue together. Please let me know if there's anything specific you would like me to do in the meantime. Thanks again for the opportunity to be a part of this project!
from validator.js.
I'm not familiar with this syntax, are you sure you are making an issue for this project?
from validator.js.
Hi @WikiRik
Thank you for your reply. I understand that you are not familiar with the syntax I am using to add a timestamp validator. I apologize for any confusion.
I am proposing a change to validator.js to add a default timestamp validator. I believe that this would be a valuable improvement for the library, as it would make it easier for users to validate timestamps.
validator.register('timestamp', {
validate(timestamp) {
// Check if the timestamp is a number.
if (!timestamp || isNaN(timestamp)) {
return false;
}
// Check if the timestamp is within a certain range.
const minTimestamp = 1656480000; // Unix timestamp for 2023-10-01 00:00:00 UTC
const maxTimestamp = Date.now(); // Current Unix timestamp
if (timestamp < minTimestamp || timestamp > maxTimestamp) {
return false;
}
return true;
}});
I believe that this implementation would be simple to implement and easy to use. It would also be flexible enough to meet the needs of most users.
would appreciate it if you would consider adding this change to validator.js.
Thank you for your time and consideration.
from validator.js.
Related Issues (20)
- Inconsistent isSlug results with "." in the inputs HOT 2
- "Cannot find module" error for lib or es/lib modules HOT 4
- isDate returns false for all strings HOT 10
- extended ascii passed isEmail validation HOT 1
- isEmail does not reject emails when blacklisted_chars includes quote
- get list of supported countries for passports HOT 2
- Invalid URL get validated HOT 2
- "Cannot find module './util/assertString'" since 13.12.0 HOT 2
- 🚧: Stale Prs HOT 5
- Update isUUID() to fully support the new UUID spec (RFC9562) HOT 4
- Should isURL accept accented urls or should make this validation optional? HOT 1
- isFQDN function continues executing with disabled require_tld option HOT 2
- isDate raise an exception on "2024-08-" HOT 6
- `isNumeric` doesn't support scientific notation HOT 3
- Create a File type validtor HOT 1
- Email address starting with double quote passes isEmail validation HOT 2
- IsMobilePhone.js - Update Regular Expression for Validating Panamanian Phone Numbers HOT 5
- Not suport phone numbers ( Netherland example) HOT 2
- Add SIP URI Validation HOT 1
- Email Validator issue for double quotes and special characters HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from validator.js.