File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ import {
2727 RruMultiSelectInput ,
2828 RruRadioInput ,
2929 RruSelectInput ,
30- RruTextInput ,
3130 RruTextareaInput ,
31+ RruTextInput ,
3232 useRruForm ,
3333} from '../src/index' ;
3434import animalsOptions from './data/animalsOptions' ;
@@ -533,3 +533,27 @@ export const SetValueProgrammaticallyAllTypes = (args) => {
533533 </ RruForm >
534534 ) ;
535535} ;
536+
537+ export const ValidateFieldNames = ( args ) => {
538+ const rruFormContext = useRruForm ( ) ;
539+
540+ const onSubmit = ( form ) => {
541+ action ( 'submitting the form' ) ( form ) ;
542+ } ;
543+
544+ return (
545+ < RruForm
546+ context = { rruFormContext }
547+ onSubmit = { onSubmit } >
548+
549+ < RruTextInput name = 'email' label = 'Email' requiredAsterisk />
550+ < RruTextInput name = 'color1' label = 'Email' requiredAsterisk />
551+ < RruTextInput name = 'animal.1' label = 'Email' requiredAsterisk />
552+
553+ < button type = 'submit' className = 'btn btn-primary mt-4' >
554+ Submit
555+ </ button >
556+
557+ </ RruForm >
558+ ) ;
559+ } ;
You can’t perform that action at this time.
0 commit comments