You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.
There are many ways to go about this. The easiest is to just add * to the label value. You can go even further by styling it via <sup>*</sup>.
You can even style it to be red and create a helper function to make it easier and not have <sup>*</sup> everywhere
@TheSharpieOne adding * to lable it not the best way, as if we keep adding start with each label how we will colour it to red and label remains black,
If we keep adding * everywhere with labels on the pages it will not be good idea.
I was expecting to have some prop in packages which will do this just by setting it to true.
That is where the utility/helper function I mentioned comes in very handy. Then you don't need to add <sup>*</sup> everywhere with labels on the page.
Optionally, you can extend <AvField> to enhance the label and just import and use it in place of AvField.
Following is my code and want to add star to the required fields,
<AvField type='text' id='ClusterName' name='ClusterName' label={'ClusterName'} placeholder={'Cluster_Name'} value={""} validate={{ required: {value: true, errorMessage: 'Cluster_Name'}, pattern: {value: '^[A-Za-z0-9._-]+(?: +[A-Za-z0-9._-]+)*$', errorMessage: 'MSG_Validation_Cluster'}, }} />
Cant find any options to apply star to required fields.
The text was updated successfully, but these errors were encountered: