1+ import {
2+ textUI ,
3+ textSchema ,
4+ } from 'platform/forms-system/src/js/web-component-patterns' ;
5+
6+ /**
7+ * uiSchema for the Loan Identification page (Screen 2).
8+ * Captures VA Loan Number, Name of Lender, Officer Name, and Officer Title.
9+ */
10+ export const loanIdentificationUiSchema = {
11+ loanIdentification : {
12+ 'ui:title' : 'Loan identification' ,
13+ vaLoanNumber : textUI ( {
14+ title : 'VA Loan Number' ,
15+ hint :
16+ 'Enter the VA loan number for the existing VA-guaranteed loan being refinanced. This appears on the original loan closing documents.' ,
17+ inputType : 'text' ,
18+ autocomplete : 'off' ,
19+ errorMessages : {
20+ required : 'VA Loan Number is required.' ,
21+ pattern : 'Enter a valid VA loan number.' ,
22+ } ,
23+ } ) ,
24+ nameOfLender : textUI ( {
25+ title : 'Name of lender' ,
26+ hint : 'Enter the full legal name of the VA-approved lending institution.' ,
27+ inputType : 'text' ,
28+ autocomplete : 'organization' ,
29+ errorMessages : {
30+ required : 'Name of lender is required.' ,
31+ } ,
32+ } ) ,
33+ officerName : textUI ( {
34+ title : 'Officer name' ,
35+ hint :
36+ 'Enter the full name of the lending institution officer who is certifying this worksheet.' ,
37+ inputType : 'text' ,
38+ autocomplete : 'name' ,
39+ errorMessages : {
40+ required : 'Officer name is required.' ,
41+ } ,
42+ } ) ,
43+ officerTitle : textUI ( {
44+ title : 'Officer title' ,
45+ hint :
46+ "Enter the officer's title (for example, Vice President, Loan Officer)." ,
47+ inputType : 'text' ,
48+ autocomplete : 'organization-title' ,
49+ errorMessages : {
50+ required : 'Officer title is required.' ,
51+ } ,
52+ } ) ,
53+ 'view:officerSignatureNotice' : {
54+ 'ui:description' : ( ) => (
55+ < va-additional-info trigger = "About the signature requirement" >
56+ < p >
57+ This form requires the signature and title of an officer of the
58+ lender, signed in ink on the printed form. The PDF generated by this
59+ tool must be printed and signed before inclusion in the IRRRL closing
60+ package, unless your institution has received VA authorization for
61+ electronic signature.
62+ </ p >
63+ </ va-additional-info >
64+ ) ,
65+ } ,
66+ } ,
67+ } ;
68+
69+ /**
70+ * JSON Schema for the Loan Identification page.
71+ */
72+ export const loanIdentificationSchema = {
73+ type : 'object' ,
74+ required : [ 'loanIdentification' ] ,
75+ properties : {
76+ loanIdentification : {
77+ type : 'object' ,
78+ required : [ 'vaLoanNumber' , 'nameOfLender' , 'officerName' , 'officerTitle' ] ,
79+ properties : {
80+ vaLoanNumber : {
81+ type : 'string' ,
82+ minLength : 1 ,
83+ maxLength : 14 ,
84+ pattern : '^[A-Za-z0-9\\-]+$' ,
85+ } ,
86+ nameOfLender : {
87+ type : 'string' ,
88+ minLength : 1 ,
89+ maxLength : 100 ,
90+ } ,
91+ officerName : {
92+ type : 'string' ,
93+ minLength : 1 ,
94+ maxLength : 100 ,
95+ } ,
96+ officerTitle : {
97+ type : 'string' ,
98+ minLength : 1 ,
99+ maxLength : 100 ,
100+ } ,
101+ 'view:officerSignatureNotice' : {
102+ type : 'object' ,
103+ properties : { } ,
104+ } ,
105+ } ,
106+ } ,
107+ } ,
108+ } ;
0 commit comments