aboutsummaryrefslogtreecommitdiff
path: root/server/src/Validation/Atomic.hs
diff options
context:
space:
mode:
authorJoris2019-10-09 23:16:00 +0200
committerJoris2019-10-09 23:16:04 +0200
commit7529a18ff0ac443e7f9764b5e2d0f57a5d3a850b (patch)
tree3d5cfc1f2318c2d4f889ee70764929f1a96e4c41 /server/src/Validation/Atomic.hs
parente5ac82f4808e974dec5f19fc6f059efaa5214022 (diff)
downloadbudget-7529a18ff0ac443e7f9764b5e2d0f57a5d3a850b.tar.gz
budget-7529a18ff0ac443e7f9764b5e2d0f57a5d3a850b.tar.bz2
budget-7529a18ff0ac443e7f9764b5e2d0f57a5d3a850b.zip
Use common payment validation in the backend
Remove deprecated backend validation
Diffstat (limited to 'server/src/Validation/Atomic.hs')
-rw-r--r--server/src/Validation/Atomic.hs32
1 files changed, 0 insertions, 32 deletions
diff --git a/server/src/Validation/Atomic.hs b/server/src/Validation/Atomic.hs
deleted file mode 100644
index 7a7351a..0000000
--- a/server/src/Validation/Atomic.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-module Validation.Atomic
- ( nonEmpty
- , nonNullNumber
- -- , number
- ) where
-
-import Data.Text (Text)
-import qualified Data.Text as T
-
-import qualified Common.Msg as Msg
-
-nonEmpty :: Text -> Maybe Text
-nonEmpty str =
- if T.null str
- then Just $ Msg.get Msg.Form_NonEmpty
- else Nothing
-
-nonNullNumber :: Int -> Maybe Text
-nonNullNumber n =
- if n == 0
- then Just $ Msg.get Msg.Form_NonNullNumber
- else Nothing
-
--- number :: (Int -> Bool) -> Text -> Maybe Int
--- number numberForm str =
--- case reads (T.unpack str) :: [(Int, String)] of
--- (num, _) : _ ->
--- if numberForm num
--- then Just num
--- else Nothing
--- _ ->
--- Nothing