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

feat: add format validation to date fields and to dates in schemas #451

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

flaminic
Copy link
Contributor

No description provided.

Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit ae41a24
🔍 Latest deploy log https://app.netlify.com/sites/dhis2-maintenance-app-beta/deploys/67470a221df0c2000882a198
😎 Deploy Preview https://deploy-preview-451--dhis2-maintenance-app-beta.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@flaminic flaminic force-pushed the DHIS2-18437/add-date-format-validations branch from 3052c0b to d462915 Compare November 26, 2024 15:01
@flaminic flaminic force-pushed the DHIS2-18437/add-date-format-validations branch from 97177ea to da6a8ff Compare November 27, 2024 07:28
@flaminic flaminic requested review from Chisomchima, Birkbjo and a team November 27, 2024 10:04
})
const { input, meta } = useField<string | undefined>(name)

useEffect(() => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really love this, but I guess with the validation API for the input, this is the easiest way... Doesn't handle change get called when it's cleared?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know i don't either. I think the plan was to add this to the component, since other validations are handled there as well, so was hoping for it to be a temp thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Birkbjo let me know if you think what i just pushed is better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think thats a bit cleaner - nice! Just some minor lint issues now :)

@flaminic flaminic merged commit 4ea1d3c into master Nov 27, 2024
10 checks passed
@flaminic flaminic deleted the DHIS2-18437/add-date-format-validations branch November 27, 2024 14:01
dhis2-bot added a commit that referenced this pull request Nov 27, 2024
# [0.17.0](v0.16.1...v0.17.0) (2024-11-27)

### Features

* add format validation to date fields and to dates in schemas ([#451](#451)) ([4ea1d3c](4ea1d3c))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 0.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants