Feature 11034: Forgot Password in OSM

Change-Id: I7df89b691f994a4bdf089f1a2677ab61f46b6838
Signed-off-by: jegan <jegan.s@tataelxsi.co.in>
diff --git a/osm_nbi/validation.py b/osm_nbi/validation.py
index a1911dd..e2923a4 100644
--- a/osm_nbi/validation.py
+++ b/osm_nbi/validation.py
@@ -46,6 +46,12 @@
     "pattern": "^[^,;()'\"]+$",
 }
 string_schema = {"type": "string", "minLength": 1, "maxLength": 255}
+email_schema = {
+    "type": "string",
+    "minLength": 1,
+    "maxLength": 320,
+    "pattern": "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$",
+}
 xml_text_schema = {
     "type": "string",
     "minLength": 1,
@@ -1247,6 +1253,7 @@
     "type": "object",
     "properties": {
         "username": string_schema,
+        "email_id": email_schema,
         "domain_name": shortname_schema,
         "password": user_passwd_schema,
         "projects": nameshort_list_schema,
@@ -1261,6 +1268,7 @@
     "type": "object",
     "properties": {
         "password": user_passwd_schema,
+        "email_id": email_schema,
         "old_password": passwd_schema,
         "username": string_schema,  # To allow User Name modification
         "projects": {"oneOf": [nameshort_list_schema, array_edition_schema]},