Can't get it to work. Or I'm wrong...
Simple field:
<field
name="homepage"
type="url"
label="HOMEPAGE"
size="30"
filter="url"
validate="url"
scheme="http,https"
required="true"
/>
123abc
.If I remove required
attribute, validation did not work at all(for this field).
Setting up field attribute required
(like below) in model's preprocessForm() method has no effect during validation. I do var_dump($required);
here https://github.com/joomla/joomla-cms/blob/5.0-dev/libraries/src/Form/FormField.php#L1188 and it is always false.
$form->setFieldAttribute('homepage', 'required', true);
Is this the expected behavior?
Labels |
Added:
No Code Attached Yet
|
Labels |
Added:
bug
|