[NATIVE] Input widgets and validation feedback

0
Hi all! I have a question regarding input widgets and the validation feedback. When you set validation feedback on an input widget, and the validation feedback is triggered, the input will then also be in red if you start typing right away.  This is in Native, I'm not certain whether this applies to web as well.  In this screenshot you can (hopefully) see what I mean:   So I triggered the validation feedback by leaving the input field while it was empty. I then started typing in the input field and the text “typing...” is red. We would like for this input to behave like regular input again. Does anyone know how to achieve this?  Thanks!
asked
1 answers
5

Hi,

 

Overrule the error style of TextBox by placing this in one of your own native style files and change it to your requirements, take out elements you don't want to overrule: (I took this from the Core / widgets / textbox.js)

 

Edit: Don't forget to add imports for things like import and font, these come from custom-variables (.js)

 

export const TextBox = {
    inputError: {
        // autoCapitalize, placeholderTextColor, selectionColor, underlineColorAndroid and all TextStyle properties are allowed
        color: input.errorColor,
        borderColor: input.errorColor,
        placeholderTextColor: input.errorColor,
        underlineColorAndroid: input.underlineColorAndroid,
    },
    validationMessage: {
        // All TextStyle properties are allowed
        color: input.errorColor,
        fontSize: font.size,
        fontFamily: font.family,
    },
};

 

answered