mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-23 01:35:38 +03:00
Basic validation
This commit is contained in:
parent
bec531df05
commit
73e8bed5f0
1 changed files with 7 additions and 2 deletions
|
@ -317,7 +317,7 @@ function ShortcutForm({ type, lists, followedHashtags, onSubmit }) {
|
|||
<p>
|
||||
<label>
|
||||
<span>List</span>
|
||||
<select name="id">
|
||||
<select name="id" required>
|
||||
{lists.map((list) => (
|
||||
<option value={list.id}>{list.title}</option>
|
||||
))}
|
||||
|
@ -331,7 +331,12 @@ function ShortcutForm({ type, lists, followedHashtags, onSubmit }) {
|
|||
<p>
|
||||
<label>
|
||||
<span>{text}</span>{' '}
|
||||
<input type={type} name={name} placeholder={placeholder} />
|
||||
<input
|
||||
type={type}
|
||||
name={name}
|
||||
placeholder={placeholder}
|
||||
required={type === 'text'}
|
||||
/>
|
||||
{currentType === 'hashtag' && followedHashtags.length > 0 && (
|
||||
<datalist>
|
||||
{followedHashtags.map((tag) => (
|
||||
|
|
Loading…
Reference in a new issue