Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
feat: add required validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammer5 committed Aug 8, 2019
1 parent 4fb08f0 commit a7a5c37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/validators.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './validators/required.js'
3 changes: 3 additions & 0 deletions src/validators/required.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import i18n from '@dhis2/d2-i18n'

export const required = value => (!!value ? undefined : i18n.t('Required'))

0 comments on commit a7a5c37

Please sign in to comment.