mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
feat(web/input): required fields
This commit is contained in:
@@ -16,6 +16,7 @@ const NumberField: React.FC<Props> = (props) => {
|
||||
name: `test.${props.index}.value`,
|
||||
control: props.control,
|
||||
defaultValue: props.row.default,
|
||||
rules: { required: props.row.required },
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -32,6 +33,7 @@ const NumberField: React.FC<Props> = (props) => {
|
||||
max={props.row.max}
|
||||
disabled={props.row.disabled}
|
||||
icon={props.row.icon && <FontAwesomeIcon icon={props.row.icon} fixedWidth />}
|
||||
withAsterisk={props.row.required}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user