Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some useful extra validation added e.g validate-date #8208

Closed
wants to merge 2 commits into from

Conversation

aniket19491
Copy link
Contributor

@aniket19491 aniket19491 commented Oct 30, 2015

Now you can validate your date and numeric fields.

For e.g
If you have a date field in your Joomla's form and the user enters a wrong date then you will get a fatal error on the page. So its better to validate the date field before saving.

Field 1- YYYY/MM/DD can be validate using class "validate-date"
Field 2- YYYY/MM/DD H:I:S can be validate using class "validate-datetime"

These changes have been added to "validate-uncompressed.js". To test this you will need to minify this file and replace the content of "validate.js" with this.

Let me know if any other information is needed.

@zero-24
Copy link
Contributor

zero-24 commented Oct 30, 2015

Let me know if any other information is needed.

Can you minify the validate-uncompressed.js file into validate.js with your PR? It will be easyier on merge and test ;)

@aniket19491
Copy link
Contributor Author

@zero-24 I have made changes in validate.js too.

@datredweb
Copy link

I have tested this item 🔴 unsuccessfully on e7f4cf8

If i understand the issue right then it is not fixed yet.
Replication steps:

  1. Login to the Admin
  2. Navigate to the Feeds page and create a new Feeds
  3. For the created date field, try to input some "DD/MM/YYYY", different than current date.
  4. Save it, it still works.
  5. Open the Feed again

Observe: The date is automatically transformed to a current date
Expect: We should validate the date format on the inputting steps when user trying to create a new Feed


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8208.

@aniket19491
Copy link
Contributor Author

@datredweb Thank you for testing.

Have you added the class "validate-date" or "validate-datetime" to that date input field? It won't work without adding the validate class.

@brianteeman
Copy link
Contributor

I can see what you are doing here but as it is it is not ready for inclusion in the core. If you can look at how to implement validation on the date fields in the core joomla fields we can always re-open it when it is ready for testing again.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8208.

@brianteeman brianteeman closed this May 8, 2016
@parthlawate
Copy link
Contributor

I think it should be kept open. Maybe tested via a different test case. Since this is more like a library fix which allows for new validations ..

Now that it's available it can be used in various parts of the Joomla core ?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8208.

@brianteeman
Copy link
Contributor

Provide the method for testing then

@parthlawate
Copy link
Contributor

OK.. Will ask one of the team to Submit another PR to implement this in one of the Standard Joomla forms so that the test case can be provided. And provide that link here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants