Link Search Menu Expand Document (external link)

Home > @department-of-veterans-affairs/va-forms-system-core

va-forms-system-core package

Functions

Function Description
ConditionalRoute(props)  
FormFooter()  
FormRouter(props) Manages form pages as routes Parent formik insance is rendered here
getMessage(messagePath)  
Page(props) Renders the page contents
PageContextProvider(props)  
RadioGroup(props)  
ReviewPage(props)  

Interfaces

Interface Description
Address  
FormRouterProps The prop type for the Router React component
FormTitleProps FormTitle properties
IFormData The type for the FormData to define the flexible data object
OMBInfoProps OMBInfo properties
PageProps The properties for the Page React component
ProgressBarProps  
Routable Indicates if a component can be routed using react-router-dom. The path prop must be present.
RouteInfo Used for passing a list of routes into Router Context
RouterContextProps  

Variables

Variable Description
AddressField AddressField
ArrayField The ArrayField accepts a template and a schema and renders them for each entry in whichever array field is specified in props.name. This component provides a wrapper so end users do not have to manage looping through their array, or working with Formik helpers, instead allowing them to just focus on what their React components will look like.
CapitalizeFirstLetter  
chainArrayValidations  
chainValidations  
CheckboxField CheckboxField component is a simple form building component that displays a checkbox for the user.
CheckboxFieldGroup  
Countries  
CountryUSA  
DateField  
DebuggerView Display the Formik state
EmailField Renders the EmailField component
emailRegex  
FormTitle Form Title component is a simple wrapper around a Form Title and subTitle using VA styles
FullNameField  
FUTURE_DATE_MESSAGE  
gatherFieldData  
isValidDate This function is used to validate an date field and make sure it’s not in the future
isValidEmail This function is used to validate an email address, while returning error messages if an email is invalid. The logic is as follows:1. Ensure the email address is a string. If it’s not, return an error message 2. Ensure that one of the following is true, else output an error message: 2a. The field is not required -AND- the field has no entered value 2b. The value in the field matches an email validation regular expression
isValidPhone  
isValidSSN Conditions for valid SSN from the original 1010ez pdf form: ‘123456789’ is not a valid SSN A value where the first 3 digits are 0 is not a valid SSN A value where the 4th and 5th digits are 0 is not a valid SSN A value where the last 4 digits are 0 is not a valid SSN A value with 3 digits, an optional -, 2 digits, an optional -, and 4 digits is a valid SSN 9 of the same digits (e.g., ‘111111111’) is not a valid SSN
maxLength  
MilitaryCities  
MilitaryStates  
minLength  
NumberField  
PageContext  
parseDate A function to transform a dateString in the form yyyy-mm-dd into a javascript date object. This is necessary because parsing the date string will result in a date one day before the expected value
PhoneField Renders the PhoneField component
removeUiInitialValues Returns JSON string after removing all ui initial values.
replaceUndefinedWithNull Returns null if value is undefined, otherwise returns value
required  
requiredLength  
RouterContext  
SelectField  
SSNField Renders the SSNField component
States  
States50AndDC  
StringifyFormReplacer Returns the value after checking if its value is not undefined.
Suffixes  
TextField  
transformJSONSchema A function to transform a VA schema into a flattened, Formik compatible object
UsaStates  

Type Aliases