Surface - Set custom CSS error class for text inputs

Very doable - but not a native surface concern.

Phoenix does a bit of magic to hide errors on fields the user has not yet interacted with.
This ‘magic’ is done with these classes when using ErrorTag:

  .phx-no-feedback .invalid-feedback {
    display: none;
  }

Obviously display:none; would not work on a border - and this will have to be modified achieve applying an error border to a field.

Think you would apply a default border if .phx-no-feedback is present, and when just .invalid-feedback is present on the field, apply the error border or similar…

Could also use more intelligent CSS selectors like if .invalid-feedback is present on a parent node - to apply certain styles…