Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
544b1510
Verified
Commit
544b1510
authored
Apr 19, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[team] better email validation with address-rfc2821
parent
97dbe851
Pipeline
#5969
canceled with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
spago.yaml
spago.yaml
+6
-2
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+6
-2
No files found.
spago.yaml
View file @
544b1510
workspace
:
packageSet
:
registry
:
50.1
0
.0
registry
:
50.1
1
.0
extraPackages
:
# garganscript packages
address-rfc2821
:
0.1.1
d3
:
git
:
https://github.com/garganscript/purescript-d3.git
ref
:
v0.11.0
...
...
@@ -34,6 +33,11 @@ workspace:
git
:
https://github.com/garganscript/purescript-spec-discovery.git
ref
:
v8.2.0-spago-next
# backend:
# cmd: "purs-backend-es"
# args:
# - "build"
package
:
name
:
gargantext
dependencies
:
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
544b1510
...
...
@@ -8,6 +8,7 @@ import Data.RFC2821 as RFC2821
import Data.Show.Generic (genericShow)
import Data.String (Pattern(..), contains)
import Data.Tuple.Nested ((/\))
import Debug (debugger, spy)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Effect.Exception as Exception
...
...
@@ -112,9 +113,12 @@ shareNodeInnerCpt = here.component "shareNodeInner" cpt
autocompleteSearch input = pure $ nub $ filter (contains (Pattern input)) completions
onAutocompleteClick _ = pure unit
onEnterPress text mError val = do
let eEmail = RFC2821.makeAddress
state'
let eEmail = RFC2821.makeAddress
val
case eEmail of
Left err -> T.write_ (Just "Email is invalid: " <> Exception.message err) mError
Left err -> do
let _ = spy "error" err
here.log2 "[onEnterPress] err" err
T.write_ (Just $ "Email is invalid: " <> Exception.message err) mError
Right _ -> do
T.write_ Nothing mError
launchAff_ do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment